node package manager

hook.io-notify-send

notify-send

install:

First, make sure notify-send is installed. It should be easy to find in your linux distro's package repos. If you don't have linux, tough luck unfortunately.

[sudo] npm install hookio-notify-send [-g]

example:

First, start this hook:

node ./bin/notify-send

Then, start a repl hook:

hookio --repl

Finally, emit some events:

> hook.emit("growl", "rawrrr")
 Name: the-hook             growl                                    Type: hook            Data: rawrrr ... 
true

If you have notify-send installed ()

api:

.emit("**::growl", options):

(The event is named 'growl' because a) it's a very similar program for osx and b) it's shorter.)

This will emit a message using notify-send. Pretty neat!

options:

  • opts.summary : A short-form description or a title. Defaults to this.event.
  • opts.body : A long-form description of the alert. Defaults to inspected arguments.
  • opts.level: Loglevel. Defaults to "normal". Invalid input is treated as "normal".

license:

MIT/X11.