Skip to content

Instantly share code, notes, and snippets.

@qichunren
Created May 12, 2011 09:20
Show Gist options
  • Save qichunren/968232 to your computer and use it in GitHub Desktop.
Save qichunren/968232 to your computer and use it in GitHub Desktop.
growlnotify
module Tool
module Growl
def self.growlnotify
`which growlnotify`.chomp
end
def self.exists?
!growlnotify.empty?
end
def self.notify(title, message)
Kernel.system("#{growlnotify} -t \"#{title}\" -m \"#{message}\"") if exists?
end
end # end module Growl
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment