Skip to content

Instantly share code, notes, and snippets.

@viking
Created October 18, 2014 12:56
Show Gist options
  • Save viking/6da94a403007364c3eb4 to your computer and use it in GitHub Desktop.
Save viking/6da94a403007364c3eb4 to your computer and use it in GitHub Desktop.
Script for sound notifications on when to dodge lightning in Final Fantasy X
#!/bin/bash
quick() {
sleep 1
afplay /System/Library/Sounds/Morse.aiff &
sleep 1
afplay /System/Library/Sounds/Morse.aiff &
sleep 1
afplay /System/Library/Sounds/Ping.aiff &
}
slow() {
sleep 1
afplay /System/Library/Sounds/Tink.aiff &
sleep 1
afplay /System/Library/Sounds/Tink.aiff &
sleep 1
afplay /System/Library/Sounds/Tink.aiff &
sleep 1
afplay /System/Library/Sounds/Tink.aiff &
sleep 1
afplay /System/Library/Sounds/Purr.aiff &
}
i=0
while read -s -n 1; do
i=$((i+1))
echo $i
if [ $((i % 2)) -eq 1 ]; then
quick &
else
slow &
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment