Initial configuration
This commit is contained in:
commit
294fd9dcf3
35 changed files with 5369 additions and 0 deletions
12
hosts/totsugeki/desktop/scripts/colorpicker.nix
Normal file
12
hosts/totsugeki/desktop/scripts/colorpicker.nix
Normal file
|
@ -0,0 +1,12 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "colorpicker";
|
||||
runtimeInputs = with pkgs; [ dunst hyprpicker imagemagick wl-clipboard ];
|
||||
text = ''
|
||||
COLOR=$(hyprpicker --no-fancy --autocopy)
|
||||
convert -size 1x1 xc:"$COLOR" "$HOME/.cache/.tmp_colorpicker.jpg"
|
||||
dunstify -i "$HOME/.cache/.tmp_colorpicker.jpg" "Color copiado" "$COLOR"
|
||||
rm "$HOME/.cache/.tmp_colorpicker.jpg"
|
||||
'';
|
||||
}
|
29
hosts/totsugeki/desktop/scripts/currently-playing.nix
Normal file
29
hosts/totsugeki/desktop/scripts/currently-playing.nix
Normal file
|
@ -0,0 +1,29 @@
|
|||
{ pkgs }:
|
||||
|
||||
pkgs.writeShellApplication {
|
||||
name = "get_fancy_currently_playing";
|
||||
runtimeInputs = [ pkgs.playerctl ];
|
||||
text = ''
|
||||
STRING=""
|
||||
case $(playerctl status 2> /dev/stdout) in
|
||||
"Playing")
|
||||
STRING+="⏵ "
|
||||
;;
|
||||
"Paused")
|
||||
STRING+="⏸ "
|
||||
;;
|
||||
"No players found")
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
ARTIST=$(playerctl metadata xesam:artist)
|
||||
if [[ -n $ARTIST ]]; then
|
||||
STRING+="$ARTIST // "
|
||||
fi
|
||||
TITLE=$(playerctl metadata xesam:title)
|
||||
if [[ -n $TITLE ]]; then
|
||||
STRING+="$TITLE"
|
||||
fi
|
||||
echo -e "$STRING"
|
||||
'';
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue