diff options
author | Drew DeVault <sir@cmpwn.com> | 2015-08-27 22:55:07 -0400 |
---|---|---|
committer | Drew DeVault <sir@cmpwn.com> | 2015-08-27 22:55:07 -0400 |
commit | 930d136196f12fc13380c68058c52d86107561cd (patch) | |
tree | 7aac4f1730b810fbe620ba5e70e15a51c46d24d5 /sway/commands.c | |
parent | 0a74364656ff7e36d276373a3e159e86784363d7 (diff) | |
parent | acb3fbdfb559e461aaac6d357146f43c4e9c3d38 (diff) |
Merge pull request #144 from Luminarys/master
Added in default_orientation handling
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) { return true; } +static bool cmd_orientation(struct sway_config *config, int argc, char **argv) { + if (strcasecmp(argv[0],"horizontal") == 0) { + config->default_orientation = L_HORIZ; + } else if (strcasecmp(argv[0], "vertical") == 0) { + config->default_orientation = L_VERT; + } else if (strcasecmp(argv[0], "auto") == 0) { + // Do nothing + } else { + return false; + } + return true; +} + static bool cmd_output(struct sway_config *config, int argc, char **argv) { if (!checkarg(argc, "output", EXPECTED_AT_LEAST, 1)) { return false; @@ -713,6 +726,7 @@ static bool cmd_workspace(struct sway_config *config, int argc, char **argv) { /* Keep alphabetized */ static struct cmd_handler handlers[] = { { "bindsym", cmd_bindsym }, + { "default_orientation", cmd_orientation }, { "exec", cmd_exec }, { "exec_always", cmd_exec_always }, { "exit", cmd_exit }, |