scripts/toggle_mute.sh

10 lines
223 B
Bash
Executable File

#!/bin/bash
pulsemixer --toggle-mute
muted=$(amixer -D pulse get Master | awk -F'[][]' 'END{ print $4}')
if [ "on" == "$muted" ]
then
notify-send "Sound is now toggled on"
else
notify-send "Sound is now toggled off"
fi