diff options
author | Florian Pritz <bluewind@xinu.at> | 2024-07-02 12:58:04 +0200 |
---|---|---|
committer | Florian Pritz <bluewind@xinu.at> | 2024-07-02 12:59:23 +0200 |
commit | e65064903d069256a7d80fed26c83435795cf6e0 (patch) | |
tree | cb8a91bbc01896cbba17da8f5895f3026bb07b97 | |
parent | 8fddd2b490b2caff502571fb7c4159b97fd5705e (diff) | |
download | bin-e65064903d069256a7d80fed26c83435795cf6e0.tar.gz bin-e65064903d069256a7d80fed26c83435795cf6e0.tar.xz |
Signed-off-by: Florian Pritz <bluewind@xinu.at>
-rwxr-xr-x | toggle-pulseaudio-mic-mute | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/toggle-pulseaudio-mic-mute b/toggle-pulseaudio-mic-mute new file mode 100755 index 0000000..92efec0 --- /dev/null +++ b/toggle-pulseaudio-mic-mute @@ -0,0 +1,5 @@ +#!/bin/bash + +target_value=$(if [[ $(pactl get-source-mute '@DEFAULT_SOURCE@' | sed 's/Mute: //') == "yes" ]]; then echo "no"; else echo "yes"; fi) + +pacmd list-sources | grep -oP 'index: \d+' | awk '{ print $2 }' | xargs -I{} pactl set-source-mute {} "$target_value" |