Created
December 6, 2011 22:49
-
-
Save leucos/1440410 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
play() { | |
/usr/bin/play -q /usr/share/sounds/gnome/default/alerts/glass.ogg > /dev/null 2>&1 & | |
} | |
mixer() { | |
/usr/bin/amixer sset 'Master',0 $1 > /dev/null 2>&1 | |
} | |
case $1 in | |
"lower") | |
mixer "2dB-" | |
play | |
;; | |
"louder") | |
mixer "2dB+" | |
play | |
;; | |
"mute") | |
mixer "mute" | |
play | |
;; | |
"unmute") | |
mixer "unmute" | |
play | |
;; | |
"toggle") | |
mixer "toggle" | |
play | |
;; | |
esac |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
mmm, replaced the swich case with
mixer $1
play
and it's even better...