Module: Autotest::NotifyOSD
- Defined in:
- lib/autotest/notify-osd.rb
Overview
-*- ruby -*-
Class Method Summary collapse
Class Method Details
.notify(title, msg, urg = 'normal', img = nil) ⇒ Object
5 6 7 8 9 10 11 12 13 |
# File 'lib/autotest/notify-osd.rb', line 5 def self.notify title, msg, urg = 'normal', img = nil msg += " in #{Dir.pwd.split(/\//).last(3).join("/")}" msg += " at #{Time.now.strftime('%Y-%m-%d %H:%M:%S')}" # TODO: parameterize default image img ||= '/usr/share/icons/Human/scalable/status/dialog-info.svg' cmd = "notify-send -i #{img} -u #{urg} '#{title}' '#{msg}'" system cmd nil end |