Base
System notifications using notify-send, a binary that ships with the libnotify-bin package on many Debian-based distributions.
@example Add the `:notifysend` notifier to your `Guardfile`
notification :notifysend
Shows a system notification.
@param [String] message the notification message body @param [Hash] opts additional notification library options @option opts [String] type the notification type. Either 'success',
'pending', 'failed' or 'notify'
@option opts [String] title the notification title @option opts [String] image the path to the notification image @option opts [String] c the notification category @option opts [Number] t the number of milliseconds to display (1000,
3000)
# File lib/guard/notifiers/notifysend.rb, line 44 def notify(message, opts = {}) normalize_standard_options!(opts) command = [title, message] opts = DEFAULTS.merge( i: opts.delete(:image), u: _notifysend_urgency(opts.delete(:type)) ).merge(opts) system('notify-send', *_to_arguments(command, SUPPORTED, opts)) end
Generated with the Darkfish Rdoc Generator 2.