From 4f06cc87a2a26b3f7be22268f095c00c88bf49f9 Mon Sep 17 00:00:00 2001 From: sinanmohd Date: Fri, 17 Mar 2023 11:42:54 +0530 Subject: audio_cyclesink, audio_mutemic: initial commit mute mic and cycle between wireplumber(pipewire) audio sinks --- .local/bin/audio_mutemic | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 .local/bin/audio_mutemic (limited to '.local/bin/audio_mutemic') diff --git a/.local/bin/audio_mutemic b/.local/bin/audio_mutemic new file mode 100755 index 0000000..1a2f01a --- /dev/null +++ b/.local/bin/audio_mutemic @@ -0,0 +1,15 @@ +#! /bin/sh + +# toggle mic mute and send notification about current state + +wpctl set-mute @DEFAULT_AUDIO_SOURCE@ toggle + +command -v notify-send > /dev/null || exit +case "$(wpctl get-volume @DEFAULT_AUDIO_SOURCE@)" in +*\[MUTED\]) + notify-send " muted" "microphone is muted" + ;; +*) + notify-send " unmuted" "microphone is unmuted" + ;; +esac -- cgit v1.2.3