forked from sidorares/node-i3
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
36 lines (27 loc) · 802 Bytes
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
var I3IpcClient = require('./lib/ipc').I3IpcClient;
module.exports.createClient = module.exports.connect = function(options) {
var cli = new I3IpcClient(options);
return cli;
};
I3IpcClient.prototype.command = function(arg, cb) {
this.message(0, arg, cb);
};
I3IpcClient.prototype.workspaces = function(cb) {
this.message(1, null, cb);
};
I3IpcClient.prototype.subscribe = function(events, cb) {
this.message(2, events, cb);
};
I3IpcClient.prototype.outputs = function(cb) {
this.message(3, null, cb);
};
I3IpcClient.prototype.tree = function(cb) {
this.message(4, null, cb);
};
I3IpcClient.prototype.marks = function(cb) {
this.message(5, null, cb);
};
I3IpcClient.prototype.barConfig = function(cb) {
this.message(6, null, cb);
};
module.exports.I3IpcClient = I3IpcClient;