feat: notification management with minor visuals and mpd cleanup

This commit is contained in:
2026-04-14 10:55:12 +02:00
parent 3df3c1b503
commit b8cc76158b
20 changed files with 3543 additions and 185873 deletions

28
utils/notifications/audio.sh Executable file
View File

@@ -0,0 +1,28 @@
#!/bin/sh
audio_icon="~/.config/custom_icons/audio.png"
audio_percentage=$(pactl get-sink-volume @DEFAULT_SINK@ | gawk 'match($0, / ([0-9]+)%/, a) {print a[1]}')
# FIXME: this would create an issue on the notification 1527 since it will remove it
# The alternative is storing the id with id=$(notify-send -p ...) and conditionally including the "-r $old_id" (because it locks the id in)
id=1527 # HACK: dirty but works
case $1 in
"audio_up")
notify-send -c Audio -r $id -i ~/.config/custom_icons/audio.png "Output Audio" "Up to $audio_percentage%"
;;
"audio_down")
notify-send -c Audio -r $id -i ~/.config/custom_icons/audio.png "Output Audio" "Down to $audio_percentage%"
;;
"audio_unmute")
notify-send -c Audio -r $id -i ~/.config/custom_icons/audio.png "Output Audio" "Unmuted"
;;
"audio_mute")
notify-send -c Audio -r $id -i ~/.config/custom_icons/audio.png "Output Audio" "Muted"
;;
"mic_mute")
notify-send -c Audio -r $id -i ~/.config/custom_icons/audio.png "Input Audio" "Muted"
;;
*)
;;
esac