Skip to content

Instantly share code, notes, and snippets.

@jeffrafter
Created July 25, 2012 16:15
Show Gist options
  • Save jeffrafter/3177021 to your computer and use it in GitHub Desktop.
Save jeffrafter/3177021 to your computer and use it in GitHub Desktop.
Don't Growl, Say.
module Growl
def notify_with_say(message = nil, options = {}, &block)
message = message.gsub(/in\s*[0-9\.]+\s*seconds$/, '')
`say -v Virginie "#{message}"`
return
end
alias_method_chain :notify, :say
module_function :notify
end
# Try to load a growl override
begin
load File.expand_path("../../", __FILE__) + '/.growl'
rescue LoadError
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment