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."); |
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
// wmiir controller module | |
// Adam R. Nelson | |
// August 2013 | |
var spawn = require('child_process').spawn; | |
// Spawns and returns a child process that runs `wmiir read`. | |
// The callback takes two parameters: (err, line). | |
// It is called once for each line in the file read. | |
// - err is any error that occurred, or null if no error occurred. |
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; | |
// Spawns and returns a child process that runs `wmiir read`. | |
// The callback takes two parameters: (err, line). | |
// It is called once for each line in the file read. | |
// - err is any error that occurred, or null if no error occurred. | |
// - line is the last line read from the file. | |
exports.read = function(path, callback) { | |
// Start the process. | |
var child = spawn('wmiir', ['read', path]); |
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
console.log('Hello, world!'); |
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
// wmii event handler module | |
// Adam R. Nelson | |
// August 2013 | |
var events = require('events'); | |
var util = require('util'); | |
var wmiir = require('./wmiir.js'); | |
function WmiiEvents() { |
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 events = require('./wmii_events.js'); | |
var stdin = process.openStdin(); | |
events.on('Key', function(key) { | |
console.log('Keypress: ' + key); | |
}); | |
console.log("Press ENTER to exit."); | |
stdin.on('data', function(data) { |
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
// wmii keybindings and keyboard event module | |
// Adam R. Nelson | |
// August 2013 | |
var wmiir = require('./wmiir.js'); | |
var events = require('./wmii_events.js'); | |
var globalKeys = {}; | |
var modeKeys = {}; | |
var currentMode = null; |
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
// wmii core Module | |
// Adam R. Nelson | |
// August 2013 | |
var wmiir = require('./wmiir.js'); | |
var events = require('./wmii_events.js'); | |
var keys = require('./wmii_keys.js'); | |
var dialog = require('./dialog.js'); | |
var spawn = require('child_process').spawn; |
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 dialog = require('./lib/dialog.js'); | |
var wmii = require('./lib/wmii.js'); | |
var wmiir = require('./lib/wmiir.js'); | |
var modkey = 'Mod4'; | |
var terminal = 'urxvt'; | |
function attachModKey(mode) { | |
var newMode = {}; | |
for (var key in mode) { |
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
#!/bin/sh | |
node ~/.wmii-hg/wmiirc.js |
OlderNewer