16 lines
317 B
Bash
Executable File
16 lines
317 B
Bash
Executable File
#!/bin/sh
|
|
|
|
if pacmd dump | grep -v monitor | grep -q '^set-source-mute .* no$'; then
|
|
mute=yes
|
|
else
|
|
mute=no
|
|
fi
|
|
|
|
pacmd dump | sed "/monitor/d;/^set-source-mute /!d;s/ \(no\|yes\)$/ $mute/" | pacmd
|
|
|
|
if [ "$mute" = "yes" ]; then
|
|
notify-send -u normal -t 1000 muted
|
|
else
|
|
notify-send -u critical -t 1000 UNMUTED
|
|
fi
|