Sha256: 6cd868e0d6ea2731cfff52e5f099c9b9edb3296274bcd5c51f571cb20b1d30b1
Contents?: true
Size: 377 Bytes
Versions: 4
Compression:
Stored size: 377 Bytes
Contents
module Notifier module NotifySend extend self def supported? Notifier.os?(/(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
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
notifier-0.5.0 | lib/notifier/notify_send.rb |
notifier-0.4.1 | lib/notifier/notify_send.rb |
notifier-0.4.0 | lib/notifier/notify_send.rb |
notifier-0.2.1 | lib/notifier/notify_send.rb |