Sha256: 1258bebcd6803e923bd6179fa12b3cdff7457452e2bbcda246ddab6c20583be5
Contents?: true
Size: 397 Bytes
Versions: 2
Compression:
Stored size: 397 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].to_s, options[:title].to_s, options[:message].to_s ] Thread.new { system(*command) }.join end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
notifier-0.5.2 | lib/notifier/notify_send.rb |
notifier-0.5.1 | lib/notifier/notify_send.rb |