aboutsummaryrefslogtreecommitdiff
path: root/sway/commands/output/mode.c
diff options
context:
space:
mode:
authorSimon Ser <contact@emersion.fr>2019-10-26 22:36:49 +0200
committerBrian Ashworth <bosrsf04@gmail.com>2019-11-04 19:40:47 -0500
commit38b37247ff26b7c0926a8d31c1a91f818d1f5d84 (patch)
tree6589cc37ee6374ceca8cd2d42d1b95d26e82c1a8 /sway/commands/output/mode.c
parenteaee087c1705713cd957a4050b3734c27434cb78 (diff)
Add --custom to `output mode` command
This forces to set the mode as a custom mode.
Diffstat (limited to 'sway/commands/output/mode.c')
-rw-r--r--sway/commands/output/mode.c8
1 files changed, 8 insertions, 0 deletions
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) {