togmic: add script
This commit is contained in:
parent
32b277c8c9
commit
2bffbf2259
1 changed files with 15 additions and 0 deletions
15
common/.local/libexec/dwm/togmic
Executable file
15
common/.local/libexec/dwm/togmic
Executable file
|
@ -0,0 +1,15 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
muted() {
|
||||||
|
pactl get-source-mute @DEFAULT_SOURCE@ | awk '{print $2}'
|
||||||
|
}
|
||||||
|
|
||||||
|
pactl set-source-mute @DEFAULT_SOURCE@ toggle
|
||||||
|
|
||||||
|
if [ "$(muted)" = "yes" ]; then
|
||||||
|
notify-send -h string:x-dunst-stack-tag:"togmic" \
|
||||||
|
"Microphone Muted" -i mic-off
|
||||||
|
else
|
||||||
|
notify-send -h string:x-dunst-stack-tag:"togmic" \
|
||||||
|
"Microphone Unmuted" -i mic-ready
|
||||||
|
fi
|
Loading…
Add table
Add a link
Reference in a new issue