Native Node.js C++ extension for displaying desktop notifications using GNOME's libnotify (libnotifymm) library.
C++ Python JavaScript
Latest commit 1e2e1ae Feb 14, 2015 @olalonde Merge pull request #4 from freehaha/gyp
use node-gyp and libnotify
Permalink
Failed to load latest commit information.
build initial commit, minimal functionnality Mar 1, 2011
demo
src
.gitignore
LICENSE
README.md
TUTORIAL.md Edited TUTORIAL.md via GitHub Jun 2, 2011
binding.gyp
package.json
screenshot.png
wscript initial commit, minimal functionnality Mar 1, 2011

README.md

Tutorial available here: How to write your own native Node.js extension or in TUTORIAL.md

This is a follow up to How to roll out your own Javascript API with V8.

Install

Dependencies(Debian, Ubuntu):

sudo apt-get install libnotify-dev

Using npm:

npm install notify

Manually:

node-gyp configure && node-gyp build

Usage

var notify = require("notify"); // or "../build/Release/gtknotify.node" if you build manually
var notification = new notify.notification();
notification.title = "Notification title";
notification.icon = "emblem-default"; // see /usr/share/icons/gnome/16x16
notification.send("Notification message"); // using libnotify's default timeout

To send notification with a timeout:

notification.send("Notification message", 3000); // 3 sec timeout
// or
notification.send("Notification message", 0); // lasts forever
notification.close(); // closes it

References