r2d2
v0.0.4
Published
Plays a random sound as a notification from console or cli
Downloads
9
Readme
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