|
|
Display Notification Center Alerts from command line and AppleScripts
You can then make a simple bash interface (e.g. ~/bin/Notify.sh):
#!/bin/bash
make it executable (e.g. chmod u+x ~/bin/Notify.sh), and then use:
Notify.sh title subtitle message
This makes an easy replacement for growlnotify scripts. Thanks!
Display Notification Center Alerts from command line and AppleScripts
You can also add this as a function to your .bashrc file. The nice part about this is if you just want to fire a quick message without a title or a subtitle, you can.
function notify {
if [ -z $1 ]; then
echo "Usage: notify "
echo "Usage: notify "
echo "Usage: notify "
elif [ -z $2 ]; then
automator -D message="$1" ~/Documents/Notify.workflow > /dev/null 2>&1
elif [ -z $3 ]; then
automator -D title="$1" -D message="$2" ~/Documents/Notify.workflow > /dev/null 2>&1
else
automator -D title="$1" -D subtitle="$2" -D message="$3" ~/Documents/Notify.workflow > /dev/null 2>&1
fi
}
|
SearchFrom our Sponsor...Latest Mountain Lion HintsWhat's New:HintsNo new hintsComments last 2 daysLinks last 2 weeksNo recent new linksWhat's New in the Forums?
Hints by TopicNews from Macworld
From Our Sponsors |
|
Copyright © 2014 IDG Consumer & SMB (Privacy Policy) Contact Us All trademarks and copyrights on this page are owned by their respective owners. |
Visit other IDG sites: |
|
|
|
Created this page in 0.05 seconds |
|