aboutsummaryrefslogtreecommitdiffstats
path: root/sway/commands/layout.c
diff options
context:
space:
mode:
authorLibravatar wil <william.barsse@gmail.com>2016-12-10 16:44:43 +0100
committerLibravatar wil <william.barsse@gmail.com>2016-12-29 20:31:30 +0100
commit97f7d47413967e2b6f405c4fa303850b7c56f57a (patch)
tree5237aea545fd2665b5e4a3967df5d6688d81858d /sway/commands/layout.c
parentFix user-set LD_LIBRARY_PATH (diff)
downloadsway-97f7d47413967e2b6f405c4fa303850b7c56f57a.tar.gz
sway-97f7d47413967e2b6f405c4fa303850b7c56f57a.tar.zst
sway-97f7d47413967e2b6f405c4fa303850b7c56f57a.zip
Added Awesome/Monad type "auto" layouts
Diffstat (limited to 'sway/commands/layout.c')
-rw-r--r--sway/commands/layout.c20
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