diff options
Diffstat (limited to 'sway/commands/layout.c')
-rw-r--r-- | sway/commands/layout.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sway/commands/layout.c b/sway/commands/layout.c index 08336150..e6fa7ef1 100644 --- a/sway/commands/layout.c +++ b/sway/commands/layout.c | |||
@@ -54,6 +54,26 @@ struct cmd_results *cmd_layout(int argc, char **argv) { | |||
54 | } else { | 54 | } else { |
55 | swayc_change_layout(parent, L_HORIZ); | 55 | swayc_change_layout(parent, L_HORIZ); |
56 | } | 56 | } |
57 | } else if (strcasecmp(argv[0], "auto_left") == 0) { | ||
58 | if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ | ||
59 | parent = new_container(parent, L_AUTO_LEFT); | ||
60 | } | ||
61 | swayc_change_layout(parent, L_AUTO_LEFT); | ||
62 | } else if (strcasecmp(argv[0], "auto_right") == 0) { | ||
63 | if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ | ||
64 | parent = new_container(parent, L_AUTO_RIGHT); | ||
65 | } | ||
66 | swayc_change_layout(parent, L_AUTO_RIGHT); | ||
67 | } else if (strcasecmp(argv[0], "auto_top") == 0) { | ||
68 | if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ | ||
69 | parent = new_container(parent, L_AUTO_TOP); | ||
70 | } | ||
71 | swayc_change_layout(parent, L_AUTO_TOP); | ||
72 | } else if (strcasecmp(argv[0], "auto_bot") == 0) { | ||
73 | if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ | ||
74 | parent = new_container(parent, L_AUTO_BOTTOM); | ||
75 | } | ||
76 | swayc_change_layout(parent, L_AUTO_BOTTOM); | ||
57 | } | 77 | } |
58 | } | 78 | } |
59 | 79 | ||