Specify display style to use with the growlnotify command-line utility
Solution 1:
man growlnotify
does not allow an option, and growlnotify --help
doesn't mention anything either. Which makes sense, because the issuing software does not control the style, you are -- via System Preferences!
But the growlnotify
entry there only has a single notification type Command-Line Growl Notification
(and not e.g. one notification type per priority). Therefore I don't think it's possible.
You can, however, create an AppleScript application/script that uses the Growl API to issue different types of notifications, based on some parameter. Growl documentation on how to access it via AppleScript.
Here's a sample script for AppleScript Editor:
on run argv
tell application "GrowlHelperApp"
set the allNotificationsList to ¬
{"1", "2"}
set the enabledNotificationsList to ¬
{"1", "2"}
register as application ¬
"My Growl Notification App" all notifications allNotificationsList ¬
default notifications enabledNotificationsList ¬
icon of application "Script Editor"
notify with name ¬
(item 1 of argv) title ¬
(item 2 of argv) description ¬
(item 3 of argv) application name "My Growl Notification App"
end tell
end run
"1" and "2" are the names of the supported notification types. Run this script like this:
osascript growlstyle.scpt 2 Hello\ World This\ is\ the\ text
Parameters are (in order) notification type name, title, and description.
After running it once, you can configure the display settings for the notification types in System Preferences.