GrowlNotify
This gem is based on the rp-appscript bindings to applescript
Benefits over all other growl gems:
- The user doesn't need to do anything but install the gem - no growl settings need to be changed and
growlnotify
cli doesn't need to be installed - Thats about it
Usage
Configuring
GrowlNotify.config do |config|
config.notifications = ["Compass Application", "Someother Notification"]
config.default_notifications = ["Compass Application"]
config.application_name = "My Application" #this shoes up in the growl applications list in systems settings
end
You can also set a globally scoped icon:
GrowlNotify.config do |config|
config.notifications = ["Compass Application", "Someother Notification"]
config.default_notifications = ["Compass Application"]
config.application_name = "My Application" #this shoes up in the growl applications list in systems settings
config.icon = File.join("SOME PATH")
end
Using
Notification levels:
- very_low:
GrowlNotify.very_low(:title => 'HELLO WORLD', :description => 'Man that was cool')
- moderate:
GrowlNotify.moderate(:title => 'HELLO WORLD', :description => 'Man that was cool')
- normal:
GrowlNotify.normal(:title => 'HELLO WORLD', :description => 'Man that was cool')
- high:
GrowlNotify.high(:title => 'HELLO WORLD', :description => 'Man that was cool')
- emergency:
GrowlNotify.emergency(:title => 'HELLO WORLD', :description => 'Man that was cool')
Sticky messages
GrowlNotify.sticky!(:title => 'HELLO WORLD', :description => 'Man that was cool')
Options
{:title => 'no title', :application_name => "My Application", :description => 'no description', :sticky => false, :priority => 0, :with_name => "Compass Application", :icon => <file path>}
- title - Title of message box
- description - Body of your message
- icon - Icon to show - pretty much all image formats are supported
- priority - importance of message from -2 very_low .. 2 emergency
- sticky - boolean if want the message to stick to the screen
- application_name - This is set from configs but you can override it
- with_name - must me one of your set default notifications by default its set to the first one
Aurthor
GrowlNotify is written by Scott Davis
Scott is a Developer for the Space Telescope Science Institute in Baltimore, MD - Hubble Space Telescope
Copyright
Copyright (c) 2011 Scott Davis. See LICENSE.txt for further details.