record-desktop
Version:
Record gifs and take screenshots on linux, built with electron.
41 lines (30 loc) • 1.32 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getBinaries = undefined;
var _pify = require('pify');
var _pify2 = _interopRequireDefault(_pify);
var _whereis = require('whereis');
var _whereis2 = _interopRequireDefault(_whereis);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
var whereis = function whereis(bin) {
return (0, _pify2.default)(_whereis2.default)(bin).then(null, function () {
return undefined;
});
};
var obj = function obj(name, description) {
return { name: name, description: (description || '').split('\n') };
};
var binaries = [obj('slop', 'sudo apt-get install slop\nhttps://github.com/naelstrof/slop'), obj('xrectsel', 'https://github.com/lolilolicon/xrectsel'), obj('xwininfo'), obj('xdotool'), obj('s'), obj('byzanz-record', 'sudo apt-get install byzanz-record'), obj('xwd', 'take a screenshot and put in memory'), obj('convert', 'take a screenshot from memory into a file')];
var getBinaries = exports.getBinaries = function getBinaries() {
return Promise.all(binaries.map(function (bin) {
return whereis(bin.name);
})).then(function (paths) {
paths.forEach(function (path, i) {
return binaries[i].path = path;
});
return binaries;
});
};
getBinaries();