Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
19 lines (15 sloc) 357 Bytes
#!/bin/bash
#
# Filename: my_mute
# Desc: Toggles Master volume mute state (used with i3 key binding)
# Date: 2013.04.14
#
state=$(amixer get Master | grep Mono: | egrep 'Playback.*?\[on' | wc -l)
# 0 is muted [off]
# 1 is unmuted [on]
if [[ $state = 1 ]]; then
amixer set Master mute >> /dev/null
else
amixer set Master unmute >> /dev/null
fi
exit 0