toggle-mute: unsuspend device before toggling mute

Sometimes, muting/unmuting a specific device does not work, while it
work with pavucontrol. But with pavucontrol, the device is not
suspended. It seems that unsuspending the device from command line does
not keep the device unsuspended for too long (or not at all?), so it may
not work.
This commit is contained in:
Vincent Bernat 2025-04-16 07:43:41 +02:00
parent 03b2b00bb5
commit cb8d3e939d

View file

@ -20,6 +20,7 @@ case $1 in
for (source in muted) {
gsub(/['"'"'"\\\$\(\)`]/, "\\\\&", descriptions[source])
print "echo "(allmuted?"🔊":"🔇")" "descriptions[source]
print "pactl suspend-'$1' "source " false";
print "pactl set-'$1'-mute "source" "(!allmuted);
}
}' \