Created
April 18, 2014 06:19
-
-
Save dbaba/11027365 to your computer and use it in GitHub Desktop.
Notification sound shell for command line users
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/bash | |
# Example: | |
# $ scons && ~/sound.sh | |
# $ mvn clean deploy && ~/sound.sh Basso | |
VOL=6 | |
SND=$1 | |
if [ -z $SND ]; then | |
SND="Glass" | |
fi | |
AIFF="/System/Library/Sounds/$SND.aiff" | |
if [ ! -f $AIFF ]; then | |
echo "'$1' is not supported. Choose one of Basso, Funk, Ping, Submarine, Blow, Glass, Pop, Tink, Bottle, Hero, Purr, Frog, Morse, or Sosumi." | |
exit -1 | |
fi | |
afplay $AIFF -v $VOL |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment