diff options
Diffstat (limited to 'bin/mic_toggle')
| -rwxr-xr-x | bin/mic_toggle | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/bin/mic_toggle b/bin/mic_toggle index 3ead1fc..151ea48 100755 --- a/bin/mic_toggle +++ b/bin/mic_toggle @@ -3,10 +3,10 @@ # mutes the microphone and send a notification # microphone mute state -#mute="$(pulsemixer --list-sources | grep -i default | awk '{print $10}' | sed -e 's/,//g')" -# -#[ "$mute" -eq 0 ] && notify-send "Microfone" "Mudo" -# -#[ "$mute" -eq 1 ] && notify-send "Microfone" "Reativado" +mute=$(pactl get-source-mute @DEFAULT_SOURCE@ | sed -e 's;sim;1;' -e 's;não;0;' -e 's/Mute\: //') -notify-send "Microfone" "Estado alterado" && pactl set-source-mute @DEFAULT_SOURCE@ toggle +[ "$mute" -eq 0 ] && notify-send "Microfone" "Mudo" + +[ "$mute" -eq 1 ] && notify-send "Microfone" "Reativado" + +pactl set-source-mute @DEFAULT_SOURCE@ toggle |
