Module: Notifier::Kdialog
Instance Method Summary collapse
Instance Method Details
#notify(options) ⇒ Object
13 14 15 16 17 18 19 20 21 22 |
# File 'lib/notifier/kdialog.rb', line 13 def notify() command = [ "kdialog", "--title", [:title].to_s, "--passivepopup", [:message].to_s, "5" ] Thread.new { system(*command) }.join end |
#supported? ⇒ Boolean
7 8 9 10 11 |
# File 'lib/notifier/kdialog.rb', line 7 def supported? Notifier.os?(/(linux|freebsd)/) && `which kdialog > /dev/null` && $CHILD_STATUS == 0 end |