summaryrefslogtreecommitdiff
path: root/sway/commands.c
diff options
context:
space:
mode:
authorMikkel Oscar Lyderik <[email protected]>2016-04-01 00:04:08 +0200
committerMikkel Oscar Lyderik <[email protected]>2016-04-25 00:00:49 +0200
commitec7ff769c7b4da616ebe6bfd90b70350dd39e166 (patch)
tree7a6452e1d9ae7da06f5b846cf819a2db8d161cf0 /sway/commands.c
parent7efa9ab34ae1dabcc7c87d22bfba0b1312c8c662 (diff)
Tabbed and stacked layout
Diffstat (limited to 'sway/commands.c')
-rw-r--r--sway/commands.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/sway/commands.c b/sway/commands.c
index 11284577..07dd715c 100644
--- a/sway/commands.c
+++ b/sway/commands.c
@@ -1759,7 +1759,15 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
parent = parent->parent;
}
- if (strcasecmp(argv[0], "splith") == 0) {
+ if (strcasecmp(argv[0], "default") == 0) {
+ // TODO: determine default from default_orientation and
+ // cmd_workspace_layout
+ parent->layout = L_HORIZ;
+ } else if (strcasecmp(argv[0], "tabbed") == 0) {
+ parent->layout = L_TABBED;
+ } else if (strcasecmp(argv[0], "stacking") == 0) {
+ parent->layout = L_STACKED;
+ } else if (strcasecmp(argv[0], "splith") == 0) {
parent->layout = L_HORIZ;
} else if (strcasecmp(argv[0], "splitv") == 0) {
parent->layout = L_VERT;
@@ -1770,6 +1778,7 @@ static struct cmd_results *cmd_layout(int argc, char **argv) {
parent->layout = L_VERT;
}
}
+
arrange_windows(parent, parent->width, parent->height);
return cmd_results_new(CMD_SUCCESS, NULL, NULL);