The notifier handles sending messages to different notifiers. Currently the following libraries are supported:
Please see the documentation of each notifier for more information about the requirements and configuration possibilities.
Guard knows four different notification types:
The notification type selection is based on the image option that is sent to {notify}. Each image type has its own notification type, and notifications with custom images goes all sent as type `notify`. The `gntp` and `growl_notify` notifiers are able to register these types at Growl and allows customization of each notification type.
Guard can be configured to make use of more than one notifier at once, @see Guard::Dsl
NOTIFIERS | = | [ [ [:gntp, ::Guard::Notifier::GNTP], [:growl, ::Guard::Notifier::Growl], [:growl_notify, ::Guard::Notifier::GrowlNotify], [:terminal_notifier, ::Guard::Notifier::TerminalNotifier], [:libnotify, ::Guard::Notifier::Libnotify], [:notifysend, ::Guard::Notifier::NotifySend], [:notifu, ::Guard::Notifier::Notifu] | List of available notifiers, grouped by functionality. It needs to be a nested hash instead of a simpler Hash, because it maintains its order on Ruby 1.8.7 also. |
Add a notification library to be used.
@param [Symbol] name the name of the notifier to use @param [Boolean] silent disable any error message @param [Hash] options the notifier options @return [Boolean] if the notification could be added
Set the available notifications.
@param [Array<Hash>] notifications the notifications
Show a system notification with all configured notifiers.
@param [String] message the message to show @option options [Symbol, String] image the image symbol or path to an image @option options [String] title the notification title
Turn notifications on. If no notifications are defined in the `Guardfile` Guard auto detects the first available library.