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

8 lines
230 B
Bash
Executable File

#!/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"