Sha256: 1a65294930c238b22b82df52eda5b4b81a8a431e10946d9af8395ff3bd41e031
Contents?: true
Size: 744 Bytes
Versions: 1
Compression:
Stored size: 744 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 &> /dev/null` && $?.exitstatus == 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
test_notifier-0.3.5.rc.1 | lib/test_notifier/notifier/osd_cat.rb |