Skip to content

Instantly share code, notes, and snippets.

@dbaba
Created April 18, 2014 06:19
Show Gist options
  • Save dbaba/11027365 to your computer and use it in GitHub Desktop.
Save dbaba/11027365 to your computer and use it in GitHub Desktop.
Notification sound shell for command line users
#!/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