Sha256: 26c032e3e2fbe881b50f6e7fc514ceb32caca251c77b997bc4e45fccaca7612a
Contents?: true
Size: 720 Bytes
Versions: 3
Compression:
Stored size: 720 Bytes
Contents
module TestNotifier module Notifier module OsdCat extend self FONT = "-bitstream-charter-bold-r-normal--33-240-100-100-p-206-iso8859-1" POSITION = "top" POSITION_OFFSET = "0" ALIGN = "center" COLORS = { :fail => "orange", :success => "green", :error => "red" } def supported? RUBY_PLATFORM =~ /(linux|freebsd)/ && `which osd_cat` && $? == 0 end def notify(options) Thread.new do `echo #{options[:message].inspect} | osd_cat --font=#{FONT} --shadow=0 --pos=#{POSITION} -o #{POSITION_OFFSET} --delay=4 --outline=4 --align=#{ALIGN} -c #{COLORS[options[:status]]}` end end end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
test_notifier-0.3.3 | lib/test_notifier/notifier/osd_cat.rb |
test_notifier-0.3.2 | lib/test_notifier/notifier/osd_cat.rb |
test_notifier-0.3.1 | lib/test_notifier/notifier/osd_cat.rb |