Fork of node-i3 to instead target sway.
npm install git+https://github.com/Rotekoppen/node-sway
Sends the to sway, very much alike running swaymsg
All theese functions work the same way, they fetch something and passes it to an callback.
Gets the workspaces and passes it to the callback
Gets the outputs and passes it to the callback
Gets the tree and passes it to the callback
Gets the marks and passes it to the callback
Gets the bar config and passes it to the callback
Gets the version and passes it to the callback
Gets the available modes and passes it to the callback
Gets the active mode and passes it to the callback
Gets the top level config file and passes it to the callback
Gets the seats and passes it to the callback
Gets the inputs and passes it to the callback
var sway = require('node-sway').createClient();
sway.command('focus left');
sway.on('workspace', function(w) {
console.log('workspace event!', w);
})
var sway = require('node-sway').createClient();
sway.inputs(console.log);
var sway = require('node-sway').createClient();
sway.mode(console.log);
sway.modes(console.log);