Created
January 23, 2012 02:59
-
-
Save lithid/1660186 to your computer and use it in GitHub Desktop.
Audible notification of new google voice text
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 | |
# Lithid | |
while true; do | |
# Title of the google voice window to look for | |
# Gmail | |
#MESSAGE=$(xwininfo -tree -root |grep -c "Gmail - Inbox ([1-999])") | |
# Google Voice | |
MESSAGE=$(xwininfo -tree -root |grep -c "Google Voice - Inbox ([1-999])") | |
# File to play audible notification | |
SOUND="/usr/share/sounds/purple/receive.wav" | |
# How many seconds between reminders. 0 means none | |
NUM="15" | |
if [ "$MESSAGE" -eq "1" ]; then | |
aplay $SOUND 2> /dev/null | |
sleep $NUM | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment