]> git.armaanb.net Git - bin.git/blobdiff - audio-set
Autostart: Switch to a picture wallpaper and picom
[bin.git] / audio-set
index 572bdf522f464d91d4d7460ea599eb98ee59ad16..ba02f980a00a8142f42940227a7f03d0912b853a 100755 (executable)
--- a/audio-set
+++ b/audio-set
@@ -5,8 +5,14 @@ if [[ ${1} ]]; then
   [[ $(amixer sget Master | tail -n 1 | grep "off") ]] &&
     pactl set-sink-mute 0 toggle
   pactl set-sink-volume 0 ${1}%
+  mutes="Unmuted"
 else
   pactl set-sink-mute 0 toggle
+  mutes="Muted"
 fi
 
-notify-send "Volume" "$(amixer sget Master | tail -n 1)" -t 1000
+dunstify -h string:x-canonical-private-synchronous:audio \
+  "Volume" "${mutes}" \
+  -h int:value:"$(amixer sget Master | tail -n 1 | cut -d '[' -f 2 | \
+  head -c +2)" \
+  -t 1000