From 38b37247ff26b7c0926a8d31c1a91f818d1f5d84 Mon Sep 17 00:00:00 2001 From: Simon Ser Date: Sat, 26 Oct 2019 22:36:49 +0200 Subject: Add --custom to `output mode` command This forces to set the mode as a custom mode. --- sway/commands/output/mode.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sway/commands/output') diff --git a/sway/commands/output/mode.c b/sway/commands/output/mode.c index bcfce372..5b710713 100644 --- a/sway/commands/output/mode.c +++ b/sway/commands/output/mode.c @@ -12,6 +12,14 @@ struct cmd_results *output_cmd_mode(int argc, char **argv) { struct output_config *output = config->handler_context.output_config; + if (strcmp(argv[0], "--custom") == 0) { + argv++; + argc--; + output->custom_mode = 1; + } else { + output->custom_mode = 0; + } + char *end; output->width = strtol(*argv, &end, 10); if (*end) { -- cgit v1.2.3