r2d2

0.0.4 • Public • Published

r2d2

Sound notifier

Description

Plays a random R2-D2 sound (ogg) as a notification from console or cli.

The sound is played with gstreamer. It WON'T work without it.

Install

npm install r2d2 --save

Usage

Create an instance and call headsUp():

var notifier = require('r2d2');
 
notifier.headsUp(function(error, stdin, stdout){
  if(err) {
    console.error('Error: couldn\'t play sound because:');
    console.error(err.stack);
  }
  console.log('You\'ve been notified');
});

API

headsUp([callback])

Plays a random sound and executes callback. Callback signature is forwarded from child_process.exec: error, stdin, stdout

Just for fun and testing

Readme

Keywords

none

Package Sidebar

Install

npm i r2d2

Weekly Downloads

0

Version

0.0.4

License

ISC

Last publish

Collaborators

  • cg