Module: Notifier::Knotify
Instance Method Summary collapse
Instance Method Details
#notify(options) ⇒ Object
9 10 11 12 13 14 15 16 17 |
# File 'lib/notifier/knotify.rb', line 9 def notify() command = [ "dcop", "knotify", "default", "notify", "eventname", [:title], [:message], "", "", "16", "2" ] Thread.new { system(*command) } end |
#supported? ⇒ Boolean
5 6 7 |
# File 'lib/notifier/knotify.rb', line 5 def supported? Notifier.os?(/(linux|freebsd)/) && `ps -Al | grep dcop` && $? == 0 end |