Created
January 8, 2012 06:00
-
-
Save shtirlic/1577417 to your computer and use it in GitHub Desktop.
Patched file for 1.3.2 Growl with android-notifier
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/sh | |
# ANDROID_NOTIFICATION is in the format DEVICE_ID/NOTIFICATION_ID/EVENT_TYPE/EVENT_CONTENTS | |
NOTIFICATION_TYPE="`echo $ANDROID_NOTIFICATION | sed 's/.*\/.*\/\(.*\)\/.*/\1/'`" | |
NOTIFICATION_DATA="`echo $ANDROID_NOTIFICATION | sed 's/.*\///'`" | |
if [ $NOTIFICATION_TYPE == "RING" ]; then | |
TEXT_TO_SAY="Call from" | |
elif [ $NOTIFICATION_TYPE == "SMS" ]; then | |
TEXT_TO_SAY="SMS received:" | |
elif [ $NOTIFICATION_TYPE == "MMS" ]; then | |
TEXT_TO_SAY="MMS received:" | |
elif [ $NOTIFICATION_TYPE == "BATTERY" ]; then | |
TEXT_TO_SAY="Battery status:" | |
else | |
TEXT_TO_SAY="Unknown notification received" | |
#exit | |
fi | |
TEXT_TO_SAY="$TEXT_TO_SAY $NOTIFICATION_DATA" | |
/usr/local/bin/growlnotify -m "$TEXT_TO_SAY" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment