diff options
author | wil <william.barsse@gmail.com> | 2017-01-14 19:34:04 +0100 |
---|---|---|
committer | wil <william.barsse@gmail.com> | 2017-01-14 19:41:00 +0100 |
commit | 71b386964afa553cb2386a06304bfe55cdc25aa1 (patch) | |
tree | afcca444fa5acb2a267ee7e573e684a965ee3f2a /sway/commands/workspace_layout.c | |
parent | Improved behavior of insert/remove child in auto layouts (diff) | |
download | sway-71b386964afa553cb2386a06304bfe55cdc25aa1.tar.gz sway-71b386964afa553cb2386a06304bfe55cdc25aa1.tar.zst sway-71b386964afa553cb2386a06304bfe55cdc25aa1.zip |
replaced "bot" with "bottom" in auto layout commands
Diffstat (limited to 'sway/commands/workspace_layout.c')
-rw-r--r-- | sway/commands/workspace_layout.c | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/sway/commands/workspace_layout.c b/sway/commands/workspace_layout.c index 3e0a12ce..c9305773 100644 --- a/sway/commands/workspace_layout.c +++ b/sway/commands/workspace_layout.c | |||
@@ -3,7 +3,7 @@ | |||
3 | 3 | ||
4 | struct cmd_results *cmd_workspace_layout(int argc, char **argv) { | 4 | struct cmd_results *cmd_workspace_layout(int argc, char **argv) { |
5 | struct cmd_results *error = NULL; | 5 | struct cmd_results *error = NULL; |
6 | if ((error = checkarg(argc, "workspace_layout", EXPECTED_EQUAL_TO, 1))) { | 6 | if ((error = checkarg(argc, "workspace_layout", EXPECTED_AT_LEAST, 1))) { |
7 | return error; | 7 | return error; |
8 | } | 8 | } |
9 | 9 | ||
@@ -13,16 +13,27 @@ struct cmd_results *cmd_workspace_layout(int argc, char **argv) { | |||
13 | config->default_layout = L_STACKED; | 13 | config->default_layout = L_STACKED; |
14 | } else if (strcasecmp(argv[0], "tabbed") == 0) { | 14 | } else if (strcasecmp(argv[0], "tabbed") == 0) { |
15 | config->default_layout = L_TABBED; | 15 | config->default_layout = L_TABBED; |
16 | } else if (strcasecmp(argv[0], "auto_left") == 0) { | 16 | } else if (strcasecmp(argv[0], "auto") == 0) { |
17 | config->default_layout = L_AUTO_LEFT; | 17 | if (argc == 1) { |
18 | } else if (strcasecmp(argv[0], "auto_right") == 0) { | 18 | config->default_layout = L_AUTO_FIRST; |
19 | config->default_layout = L_AUTO_RIGHT; | 19 | } else { |
20 | } else if (strcasecmp(argv[0], "auto_top") == 0) { | 20 | if ((error = checkarg(argc, "workspace_layout auto", EXPECTED_EQUAL_TO, 2))) { |
21 | config->default_layout = L_AUTO_TOP; | 21 | return error; |
22 | } else if (strcasecmp(argv[0], "auto_bottom") == 0) { | 22 | } |
23 | config->default_layout = L_AUTO_BOTTOM; | 23 | if (strcasecmp(argv[0], "left") == 0) { |
24 | config->default_layout = L_AUTO_LEFT; | ||
25 | } else if (strcasecmp(argv[0], "right") == 0) { | ||
26 | config->default_layout = L_AUTO_RIGHT; | ||
27 | } else if (strcasecmp(argv[0], "top") == 0) { | ||
28 | config->default_layout = L_AUTO_TOP; | ||
29 | } else if (strcasecmp(argv[0], "bottom") == 0) { | ||
30 | config->default_layout = L_AUTO_BOTTOM; | ||
31 | } else { | ||
32 | return cmd_results_new(CMD_INVALID, "workspace_layout auto", "Expected 'workspace_layout auto <left|right|top|bottom>'"); | ||
33 | } | ||
34 | } | ||
24 | } else { | 35 | } else { |
25 | return cmd_results_new(CMD_INVALID, "workspace_layout", "Expected 'workspace_layout <default|stacking|tabbed|auto_left|auto_right|auto_top|auto_bottom>'"); | 36 | return cmd_results_new(CMD_INVALID, "workspace_layout", "Expected 'workspace_layout <default|stacking|tabbed|auto|auto left|auto right|auto top|auto bottom>'"); |
26 | } | 37 | } |
27 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | 38 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); |
28 | } | 39 | } |