Code Monkey home page Code Monkey logo

growl_notify's Introduction

GrowlNotify

This gem is based on the rb-appscript bindings to applescript

Benefits over all other growl gems:

  1. 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
  2. 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:

  1. very_low: GrowlNotify.very_low(:title => 'HELLO WORLD', :description => 'Man that was cool')
  2. moderate: GrowlNotify.moderate(:title => 'HELLO WORLD', :description => 'Man that was cool')
  3. normal: GrowlNotify.normal(:title => 'HELLO WORLD', :description => 'Man that was cool')
  4. high: GrowlNotify.high(:title => 'HELLO WORLD', :description => 'Man that was cool')
  5. 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>}
  1. title - Title of message box
  2. description - Body of your message
  3. icon - Icon to show - pretty much all image formats are supported
  4. priority - importance of message from -2 very_low .. 2 emergency
  5. sticky - boolean if want the message to stick to the screen
  6. application_name - This is set from configs but you can override it
  7. 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

Twitter

Copyright

Copyright (c) 2011 Scott Davis. See LICENSE.txt for further details.

growl_notify's People

Contributors

netzpirat avatar scottdavis avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.