Base
System notifications using the [libnotify](github.com/splattael/libnotify) gem.
This gem is available for Linux, FreeBSD, OpenBSD and Solaris and sends system notifications to Gnome [libnotify](developer.gnome.org/libnotify):
@example Add the `libnotify` gem to your `Gemfile`
group :development gem 'libnotify' end
@example Add the `:libnotify` notifier to your `Guardfile`
notification :libnotify
@example Add the `:libnotify` notifier with configuration options to your `Guardfile`
notification :libnotify, timeout: 5, transient: true, append: false, urgency: :critical
Default options for the libnotify notifications.
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 [Boolean] transient keep the notifications around after
display
@option opts [Boolean] append append onto existing notification @option opts [Number, Boolean] timeout the number of seconds to display
(1.5 (s), 1000 (ms), false)
# File lib/guard/notifiers/libnotify.rb, line 56 def notify(message, opts = {}) self.class.require_gem_safely normalize_standard_options!(opts) opts = DEFAULTS.merge( summary: opts.delete(:title), icon_path: opts.delete(:image), body: message, urgency: _libnotify_urgency(opts.delete(:type)) ).merge(opts) ::Libnotify.show(opts) end
Generated with the Darkfish Rdoc Generator 2.