diff --git a/.config/scripts/wm/toggle-mic-notify b/.config/scripts/wm/toggle-mic-notify index 7e996e7..b73201c 100755 --- a/.config/scripts/wm/toggle-mic-notify +++ b/.config/scripts/wm/toggle-mic-notify @@ -1,6 +1,7 @@ #!/bin/sh -amixer set Capture toggle @> /dev/null -str=$(grep '\[on\]\|\[off\]' <<< $(amixer get Capture) | awk '{print $5}') -echo $str -notify-send "Microphone: $str" +pactl set-source-mute @DEFAULT_SOURCE@ toggle +str=$(pactl get-source-mute @DEFAULT_SOURCE@| awk '{print $2}') + +[[ "$str" == "yes" ]] && notify-send "Microphone: off" +[[ "$str" == "no" ]] && notify-send "Microphone: on"