mac_notify

1.0.1 • Public • Published

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.

Package Sidebar

Install

npm i mac_notify

Weekly Downloads

6

Version

1.0.1

License

BSD

Last publish

Collaborators

  • nim579