Simple node.js script that prints wmii events as they occur.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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