diff options
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/sway/commands.c b/sway/commands.c index df48724a..1d88e724 100644 --- a/sway/commands.c +++ b/sway/commands.c | |||
@@ -388,6 +388,19 @@ static bool cmd_move(struct sway_config *config, int argc, char **argv) { | |||
388 | return true; | 388 | return true; |
389 | } | 389 | } |
390 | 390 | ||
391 | static bool cmd_orientation(struct sway_config *config, int argc, char **argv) { | ||
392 | if (strcasecmp(argv[0],"horizontal") == 0) { | ||
393 | config->default_orientation = L_HORIZ; | ||
394 | } else if (strcasecmp(argv[0], "vertical") == 0) { | ||
395 | config->default_orientation = L_VERT; | ||
396 | } else if (strcasecmp(argv[0], "auto") == 0) { | ||
397 | // Do nothing | ||
398 | } else { | ||
399 | return false; | ||
400 | } | ||
401 | return true; | ||
402 | } | ||
403 | |||
391 | static bool cmd_output(struct sway_config *config, int argc, char **argv) { | 404 | static bool cmd_output(struct sway_config *config, int argc, char **argv) { |
392 | if (!checkarg(argc, "output", EXPECTED_AT_LEAST, 1)) { | 405 | if (!checkarg(argc, "output", EXPECTED_AT_LEAST, 1)) { |
393 | return false; | 406 | return false; |
@@ -713,6 +726,7 @@ static bool cmd_workspace(struct sway_config *config, int argc, char **argv) { | |||
713 | /* Keep alphabetized */ | 726 | /* Keep alphabetized */ |
714 | static struct cmd_handler handlers[] = { | 727 | static struct cmd_handler handlers[] = { |
715 | { "bindsym", cmd_bindsym }, | 728 | { "bindsym", cmd_bindsym }, |
729 | { "default_orientation", cmd_orientation }, | ||
716 | { "exec", cmd_exec }, | 730 | { "exec", cmd_exec }, |
717 | { "exec_always", cmd_exec_always }, | 731 | { "exec_always", cmd_exec_always }, |
718 | { "exit", cmd_exit }, | 732 | { "exit", cmd_exit }, |