Commit: 646acdf59616a13546950e92725bcbc232fff58e
Parent: 21a6ee2b8781283c9412db4c96bad06027857abe
Author: Randy Palamar
Date: Tue, 11 Apr 2023 09:12:32 -0600
volume: support toggle for pulse/pipewire
Diffstat:
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/bin/volume b/bin/volume
@@ -5,7 +5,11 @@
OUT=${AUDIOSINK:-"Speaker"}
if [ $OUT == "pulse" ]; then
- pactl set-sink-volume 0 $@
+ if [ "$1" == "toggle" ]; then
+ pactl set-sink-mute 0 $@
+ else
+ pactl set-sink-volume 0 $@
+ fi
else
amixer -q set "$OUT" $@
fi