"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const tslib_1 = require("tslib");
/**
 * penguins-eggs
 * command: adapt.ts
 * author: Piero Proietti
 * email: piero.proietti@gmail.com
 * license: MIT
 */
const core_1 = require("@oclif/core");
const utils_1 = tslib_1.__importDefault(require("../classes/utils"));
const utils_2 = require("../lib/utils");
class Adapt extends core_1.Command {
    async run() {
        const { args, flags } = await this.parse(Adapt);
        let verbose = false;
        if (flags.verbose) {
            verbose = true;
        }
        const echo = utils_1.default.setEcho(verbose);
        // const {args, flags} = this.parse(Adjust)
        utils_1.default.titles(this.id + ' ' + this.argv);
        utils_1.default.warning('Adapt monitor resolutions to the size of window in virtual machines');
        await (0, utils_2.exec)('xrandr --output Virtual-0 --auto', echo);
        await (0, utils_2.exec)('xrandr --output Virtual-1 --auto', echo);
        await (0, utils_2.exec)('xrandr --output Virtual-2 --auto', echo);
        await (0, utils_2.exec)('xrandr --output Virtual-3 --auto', echo);
    }
}
Adapt.flags = {
    help: core_1.Flags.help({ char: 'h' }),
    verbose: core_1.Flags.boolean({ char: 'v' }),
};
Adapt.description = 'adapt monitor resolution for VM only';
Adapt.examples = [
    'eggs adapt',
];
exports.default = Adapt;
