From e65064903d069256a7d80fed26c83435795cf6e0 Mon Sep 17 00:00:00 2001 From: Florian Pritz Date: Tue, 2 Jul 2024 12:58:04 +0200 Subject: add toggle-pulseaudio-mic-mute Signed-off-by: Florian Pritz --- toggle-pulseaudio-mic-mute | 5 +++++ 1 file changed, 5 insertions(+) create mode 100755 toggle-pulseaudio-mic-mute (limited to 'toggle-pulseaudio-mic-mute') 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" -- cgit v1.2.3-24-g4f1b