2017-01-31 07:50:28 +01:00
|
|
|
const Launcher = require('../../comp/launcher');
|
2016-04-19 20:48:49 +02:00
|
|
|
|
2019-08-16 23:05:39 +02:00
|
|
|
const AutoTypeHelper = function() {};
|
2016-04-19 20:48:49 +02:00
|
|
|
|
|
|
|
AutoTypeHelper.prototype.getActiveWindowTitle = function(callback) {
|
2016-04-24 22:29:28 +02:00
|
|
|
Launcher.spawn({
|
|
|
|
cmd: 'xdotool',
|
|
|
|
args: ['getactivewindow', 'getwindowname'],
|
2016-08-07 19:56:40 +02:00
|
|
|
complete: function(err, res) {
|
2016-04-24 22:29:28 +02:00
|
|
|
return callback(err, res ? res.trim() : undefined);
|
|
|
|
}
|
|
|
|
});
|
2016-04-19 20:48:49 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
module.exports = AutoTypeHelper;
|