get linux window title

This commit is contained in:
antelle 2016-04-24 23:29:28 +03:00
parent 4503f4bcd8
commit 41cace7805
1 changed files with 8 additions and 2 deletions

View File

@ -1,12 +1,18 @@
'use strict';
// var Launcher = require('../../comp/launcher');
var Launcher = require('../../comp/launcher');
var AutoTypeHelper = function() {
};
AutoTypeHelper.prototype.getActiveWindowTitle = function(callback) {
callback('Not implemented');
Launcher.spawn({
cmd: 'xdotool',
args: ['getactivewindow', 'getwindowname'],
callback: function(err, res) {
return callback(err, res ? res.trim() : undefined);
}
});
};
module.exports = AutoTypeHelper;