diff options
author | wil <william.barsse@gmail.com> | 2016-12-10 16:44:43 +0100 |
---|---|---|
committer | wil <william.barsse@gmail.com> | 2016-12-29 20:31:30 +0100 |
commit | 97f7d47413967e2b6f405c4fa303850b7c56f57a (patch) | |
tree | 5237aea545fd2665b5e4a3967df5d6688d81858d /sway/commands | |
parent | 6a1df17fb7f7bcfa26d825173de4d31b771fd7a6 (diff) | |
download | sway-97f7d47413967e2b6f405c4fa303850b7c56f57a.tar.xz |
Added Awesome/Monad type "auto" layouts
Diffstat (limited to 'sway/commands')
-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); } } |