diff options
author | zachir <zachir@librem.one> | 2022-10-10 12:06:33 -0500 |
---|---|---|
committer | zachir <zachir@librem.one> | 2022-10-10 12:06:33 -0500 |
commit | 9d76474479cfc6831e3eca18bdf1cf9536c112cd (patch) | |
tree | fe8573629ea407b6da87f087ede2d57654a7fc64 | |
parent | 49c629d4863c20b9e3c573d80254f8ce560e3d19 (diff) |
update volsv to fix mic mute with pipewire1.0
-rwxr-xr-x | volsv | 15 |
1 files changed, 14 insertions, 1 deletions
@@ -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 |