Module: Notifier::Hud
Instance Method Summary collapse
Instance Method Details
#hud_bin ⇒ Object
11 12 13 14 15 16 |
# File 'lib/notifier/hud.rb', line 11 def hud_bin @hud_bin ||= [ "/Applications/hud.app/Contents/MacOS/cli", "~/Applications/hud.app/Contents/MacOS/cli" ].first {|path| File.(path) } end |
#notify(options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'lib/notifier/hud.rb', line 18 def notify() command = [ hud_bin, "--title", [:title].to_s, "--message", [:message].to_s, "--symbol-name", [:image].to_s ] Thread.new { system(*command) }.join end |