Skip to content

Instantly share code, notes, and snippets.

Created August 24, 2013 20:57
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) {
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment