1
0
mirror of https://github.com/tiyn/dotfiles.git synced 2025-03-19 10:17:44 +01:00
dotfiles/.local/bin/tools/audio/sound_toggle

13 lines
485 B
Bash
Executable File

#!/bin/sh
if amixer get Master | tail -2 | grep -q '\[on\]'; then
notify-send -u low 'sxhkd' 'Sound muted\nMicrophone muted'
paplay ~/.local/bin/tools/audio/sound_muted.wav
amixer set Master mute >/dev/null 2>&1
amixer set Capture nocap >/dev/null 2>&1
else
notify-send -u low 'sxhkd' 'Sound active\nMicrophone muted'
amixer set Capture nocap >/dev/null 2>&1
amixer set Master unmute >/dev/null 2>&1
paplay ~/.local/bin/tools/audio/sound_resumed.wav
fi