Module | Guard::Notifier::Libnotify |
In: |
lib/guard/notifiers/libnotify.rb
|
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
DEFAULTS | = | { :transient => false, :append => true, :timeout => 3 | Default options for libnotify gem |
Test if the notification library is available.
@param [Boolean] silent true if no error messages should be shown @return [Boolean] the availability status
Show a system notification.
@param [String] type the notification type. Either ‘success’, ‘pending’, ‘failed’ or ‘notify’ @param [String] title the notification title @param [String] message the notification message body @param [String] image the path to the notification image @param [Hash] options additional notification library options @option options [Boolean] transient keep the notifications around after display @option options [Boolean] append append onto existing notification @option options [Number, Boolean] timeout the number of seconds to display (1.5 (s), 1000 (ms), false)