Notifications from Node.js apps
CoffeeScript JavaScript
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
lib
src
.gitignore
.npmignore
README.md
index.js
package.json

README.md

MacOS notifications

Notifications from Node.js apps for MacOS, Windows and Linux (Ubuntu).

Methods

send(options[, callback])

var mac_notify = require('mac_notify');

mac_notify.send({title: 'Title', subtitle: 'subtitle', message: 'message', group: 'group'}, function(err){
    if(!err) console.log('success');
});

For MacOS

  • title — Notification
  • subtitle — NOW_DATE
  • message — Nothing
  • group — ALL

For Windows

  • title — Notification
  • message — Nothing
  • expireTime — 3000 (in miliseconds)
  • icon — "" (available error, important and paths to images)

For Linux

  • title — Notification
  • message — Nothing
  • group — ALL
  • expireTime — 3000 (in miliseconds)
  • icon — "" (available error, important and paths to images)
  • urgency — low (available low, normal, critical)

If you specify empty string (''), attribute will be turned off. If you padd null or undefined, attribute will be default.

Specifies the ‘group’ a notification belongs to. For any ‘group’ only one notification will ever be shown, replacing previously posted notifications. See terminal-notifier documentation.

©

Using terminal-notifier by alloy.

For Linux notify-send (libnotify-bin package).

For Windows notify-send.