From 9d76474479cfc6831e3eca18bdf1cf9536c112cd Mon Sep 17 00:00:00 2001 From: zachir Date: Mon, 10 Oct 2022 12:06:33 -0500 Subject: update volsv to fix mic mute with pipewire --- volsv | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/volsv b/volsv index 9d22b2d..960481a 100755 --- a/volsv +++ b/volsv @@ -29,6 +29,19 @@ pulsesv () { *) printerror "$1" ;; esac } +# if pipewire +pwiresv () { + case "$1" in + "up" | "-i") pamixer -i 5 ;; + "down" | "-d") pamixer -d 5 ;; + "toggle" | "-t") pamixer -t ;; + "mic" | "-m") amixer sset Capture toggle ;; + "getv" | "-v") printf "%s%%\n" "$(pamixer --get-volume)" ;; + "getm" | "-g") pamixer --get-mute | sed 's/[Ff]alse/\[on\]/;s/[Tt]rue/\[off\]/' ;; + "getvm" | "-vg") printf "%s%s%%\n" `pamixer --get-mute | sed 's/[Ff]alse/\[on\]/;s/[Tt]rue/\[off\]/'` "$(pamixer --get-volume)" ;; + *) printerror "$1" ;; + esac +} # if alsa alsasv () { DEVICE=`pgrep -x bluealsa >/dev/null && echo -n "bluealsa"` @@ -85,7 +98,7 @@ for i in $@; do if pgrep -x pulseaudio >/dev/null; then pulsesv $i elif pgrep -x pipewire >/dev/null; then - pulsesv $i + pwiresv $i elif pgrep -x sndiod >/dev/null; then sndiosv $i else -- cgit v1.2.3