class Guard::Notifier::Libnotify
notification :libnotify, timeout: 5, transient: true, append: false, urgency: :critical
@example Add the ‘:libnotify` notifier with configuration options to your `Guardfile`
notification :libnotify
@example Add the `:libnotify` notifier to your `Guardfile`
end
gem ’libnotify’
group :development
@example Add the ‘libnotify` gem to your `Gemfile`
Gnome [libnotify](developer.gnome.org/libnotify):
system notifications to
This gem is available for Linux, FreeBSD, OpenBSD and Solaris and sends<br><br>(github.com/splattael/libnotify) gem.
System notifications using the
def self.available?(opts = {})
def self.available?(opts = {}) super and require_gem_safely(opts) end
def self.supported_hosts
def self.supported_hosts %w[linux freebsd openbsd sunos solaris] end
def _libnotify_urgency(type)
- 
        (Symbol)- the libnotify urgency
Parameters:
- 
        type(String) -- the Guard notification type
def _libnotify_urgency(type) case type when 'failed' :normal else :low end end
def notify(message, opts = {})
(**opts)- 
        timeout(Number, Boolean) -- the number of seconds to display
- 
        append(Boolean) -- append onto existing notification
- 
        transient(Boolean) -- keep the notifications around after
- 
        image(String) -- the path to the notification image
- 
        title(String) -- the notification title
- 
        type(String) -- the notification type. Either 'success',
Parameters:
- 
        opts(Hash) -- additional notification library options
- 
        message(String) -- the notification message body
def notify(message, opts = {}) super self.class.require_gem_safely 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