1
0
Fork 0

Initial configuration

This commit is contained in:
Avery 2024-03-18 23:39:38 +01:00
commit 294fd9dcf3
Signed by: Avery
GPG key ID: B684FD451B692E04
35 changed files with 5369 additions and 0 deletions

View 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"
'';
}

View 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"
'';
}