Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Simple node.js script that prints wmii events as they occur.
var spawn = require('child_process').spawn;
var stdin = process.openStdin();
var reader = spawn('wmiir', ['read', '/event']);
reader.stdout.on('data', function(data) {
console.log("Got event: " + data);
});
console.log("Press ENTER to exit.");
stdin.on('data', function(data) {
reader.kill();
process.exit();
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.