UNPKG

sway-tools

Version:

Some tools and a library for controlling sway

19 lines (18 loc) 536 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const __1 = require(".."); const minimist = require("minimist"); (async () => { const args = minimist(process.argv.slice(2)); const output = Number.parseInt(args._[0]); if (isNaN(output)) { console.error('Out put is not a valid number'); process.exit(1); } const sway = new __1.Sway(); const outputs = await sway.getOutputs(); await sway .focus() .output(outputs[output - 1]) .exec(); })();