#! /usr/bin/env bash # From http://crunchbanglinux.org/forums/topic/11392/pulseaudio-volume-control-with-media-keys/ MUTE=`cat ~/.pulse/mute` test "$MUTE" = "1" RETURN=$? if [[ $RETURN -eq 0 ]] then "`dirname \"$0\"`"/pa-volume unmute echo "0" > ~/.pulse/mute exit fi if [[ $RETURN -eq 1 ]] then "`dirname \"$0\"`"/pa-volume mute echo "1" > ~/.pulse/mute exit fi