dotfiles/.config/scripts/wm/toggle-mic-notify

8 lines
230 B
Plaintext
Raw Permalink Normal View History

2022-07-19 05:38:37 +08:00
#!/bin/sh
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"