record-desktop
Version:
Record gifs and take screenshots on linux, built with electron.
24 lines (20 loc) • 477 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = xwininfo;
var _utils = require('../utils');
function xwininfo() {
return (0, _utils.exec)('xwininfo -id $(xdotool getactivewindow)').then(function (res) {
var lines = res.split('\n');
var fn = function fn(ind) {
return +lines[ind].split(':')[1].trim();
};
return {
x: fn(2),
y: fn(3),
width: fn(6),
height: fn(7)
};
});
};