Last active
December 18, 2015 18:39
-
-
Save Qalthos/5826866 to your computer and use it in GitHub Desktop.
Put somewhere in $PATH and give it the location of buzzer.ogg
This file contains hidden or 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/bash | |
vol_perc=$(amixer get Master | egrep -o '[0-9]+%' | head -n 1) | |
mute=$(amixer get Master | egrep -o '\[off\]' | head -n 1) | |
amixer -q set Master 100% unmute | |
mplayer buzzer.ogg | |
amixer -q set Master $vol_perc $(if [ ! -z $mute ]; then echo 'mute'; fi) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment