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) { } else { swayc_change_layout(parent, L_HORIZ); } + } else if (strcasecmp(argv[0], "auto_left") == 0) { + if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ + parent = new_container(parent, L_AUTO_LEFT); + } + swayc_change_layout(parent, L_AUTO_LEFT); + } else if (strcasecmp(argv[0], "auto_right") == 0) { + if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ + parent = new_container(parent, L_AUTO_RIGHT); + } + swayc_change_layout(parent, L_AUTO_RIGHT); + } else if (strcasecmp(argv[0], "auto_top") == 0) { + if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ + parent = new_container(parent, L_AUTO_TOP); + } + swayc_change_layout(parent, L_AUTO_TOP); + } else if (strcasecmp(argv[0], "auto_bot") == 0) { + if (parent->type != C_CONTAINER && !swayc_is_empty_workspace(parent)){ + parent = new_container(parent, L_AUTO_BOTTOM); + } + swayc_change_layout(parent, L_AUTO_BOTTOM); } } |