diff options
author | Mikkel Oscar Lyderik <[email protected]> | 2016-04-01 00:04:08 +0200 |
---|---|---|
committer | Mikkel Oscar Lyderik <[email protected]> | 2016-04-25 00:00:49 +0200 |
commit | ec7ff769c7b4da616ebe6bfd90b70350dd39e166 (patch) | |
tree | 7a6452e1d9ae7da06f5b846cf819a2db8d161cf0 /sway/commands.c | |
parent | 7efa9ab34ae1dabcc7c87d22bfba0b1312c8c662 (diff) |
Tabbed and stacked layout
Diffstat (limited to 'sway/commands.c')
-rw-r--r-- | sway/commands.c | 11 |
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); |