Sha256: 59edc1ad19c61b7de195e515eff75dcdd0701a4cd726ee7b68eb9d76ed4c2657
Contents?: true
Size: 380 Bytes
Versions: 3
Compression:
Stored size: 380 Bytes
Contents
module Notifier module NotifySend extend self def supported? RUBY_PLATFORM =~ /(linux|freebsd)/ && `which notify-send > /dev/null` && $? == 0 end def notify(options) command = [ "notify-send", "-i", options[:image], options[:title], options[:message] ] Thread.new { system(*command) } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
notifier-0.2.0 | lib/notifier/notify_send.rb |
notifier-0.1.5 | lib/notifier/notify_send.rb |
notifier-0.1.4 | lib/notifier/notify_send.rb |