Skip to content

Instantly share code, notes, and snippets.

@leucos
Created December 6, 2011 22:49
Show Gist options
  • Save leucos/1440410 to your computer and use it in GitHub Desktop.
Save leucos/1440410 to your computer and use it in GitHub Desktop.
#!/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
@leucos
Copy link
Author

leucos commented Dec 6, 2011

mmm, replaced the swich case with
mixer $1
play
and it's even better...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment