diff options
author | 2018-04-12 20:19:54 -0400 | |
---|---|---|
committer | 2018-04-12 20:19:54 -0400 | |
commit | cd1b32453a9296c18b28bff71607aeb22987b5cd (patch) | |
tree | c653c6d525b471914c01a9d7ae543f521b6138ed /sway/commands/workspace_layout.c | |
parent | Merge pull request #1634 from aleksander/master (diff) | |
parent | Fix separator height calculation (diff) | |
download | sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.gz sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.tar.zst sway-cd1b32453a9296c18b28bff71607aeb22987b5cd.zip |
Merge branch 'wlroots'
Diffstat (limited to 'sway/commands/workspace_layout.c')
-rw-r--r-- | sway/commands/workspace_layout.c | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/sway/commands/workspace_layout.c b/sway/commands/workspace_layout.c deleted file mode 100644 index 9ac84be2..00000000 --- a/sway/commands/workspace_layout.c +++ /dev/null | |||
@@ -1,40 +0,0 @@ | |||
1 | #include <string.h> | ||
2 | #include <strings.h> | ||
3 | #include "sway/commands.h" | ||
4 | |||
5 | struct cmd_results *cmd_workspace_layout(int argc, char **argv) { | ||
6 | struct cmd_results *error = NULL; | ||
7 | if ((error = checkarg(argc, "workspace_layout", EXPECTED_AT_LEAST, 1))) { | ||
8 | return error; | ||
9 | } | ||
10 | |||
11 | if (strcasecmp(argv[0], "default") == 0) { | ||
12 | config->default_layout = L_NONE; | ||
13 | } else if (strcasecmp(argv[0], "stacking") == 0) { | ||
14 | config->default_layout = L_STACKED; | ||
15 | } else if (strcasecmp(argv[0], "tabbed") == 0) { | ||
16 | config->default_layout = L_TABBED; | ||
17 | } else if (strcasecmp(argv[0], "auto") == 0) { | ||
18 | if (argc == 1) { | ||
19 | config->default_layout = L_AUTO_FIRST; | ||
20 | } else { | ||
21 | if ((error = checkarg(argc, "workspace_layout auto", EXPECTED_EQUAL_TO, 2))) { | ||
22 | return error; | ||
23 | } | ||
24 | if (strcasecmp(argv[1], "left") == 0) { | ||
25 | config->default_layout = L_AUTO_LEFT; | ||
26 | } else if (strcasecmp(argv[1], "right") == 0) { | ||
27 | config->default_layout = L_AUTO_RIGHT; | ||
28 | } else if (strcasecmp(argv[1], "top") == 0) { | ||
29 | config->default_layout = L_AUTO_TOP; | ||
30 | } else if (strcasecmp(argv[1], "bottom") == 0) { | ||
31 | config->default_layout = L_AUTO_BOTTOM; | ||
32 | } else { | ||
33 | return cmd_results_new(CMD_INVALID, "workspace_layout auto", "Expected 'workspace_layout auto <left|right|top|bottom>'"); | ||
34 | } | ||
35 | } | ||
36 | } else { | ||
37 | return cmd_results_new(CMD_INVALID, "workspace_layout", "Expected 'workspace_layout <default|stacking|tabbed|auto|auto left|auto right|auto top|auto bottom>'"); | ||
38 | } | ||
39 | return cmd_results_new(CMD_SUCCESS, NULL, NULL); | ||
40 | } | ||