Workspace can only be a split container: why?
Unless I'm wrong, seems there is no way to give a workspace, a layout of tabbed or stacked.
With the help of i3-msg -t get_tree, I could determine whenever I try to give a workspace, one of these two latter layouts, an intermediate container is created instead, with the requested layout. So seems a workspace can present two layouts only: splith or splitv.
I would just like to know why, as I don't guess what could prevent a workspace to be tabbed or stacked, directly.
Example case
- Go to a new empty workspace;
- Press
$mod+w(for English layout keyboard) to give it a tabbed layout; - Press
$mod+Enterto open a new terminal; - Repeat two more times;
- You have three terminals, the focused one is the rightmost one;
- Press
$mod+Shift+Right: the terminal goes to a parent split container.
The workspace is not the tabbed container, a child container is, and the workspace is an horizontal split container.
Introspection case
Each introspection of a state is given as an indented tree, generated using i3-msg -t get_tree. For readability, the root and __i3 nodes are not shown. The fields shown in the tree, are, in that order: name, layout, and type.
Introspection of a workspace with tabbed layout
Initial, with one terminal opened:
LVDS1|output|output|
topdock|dockarea|dockarea|
content|splith|con|
1:test|splith|workspace|
Terminal|splith|con|
bottomdock|dockarea|dockarea|
i3bar for output LVDS1|splith|con|
After switching to tabbed layout:
LVDS1|output|output|
topdock|dockarea|dockarea|
content|splith|con|
1:test|splith|workspace|
#00FF00|tabbed|con|
Terminal|splith|con|
bottomdock|dockarea|dockarea|
i3bar for output LVDS1|splith|con|
Note the unexpected additional “anonymous” container which appeared, named #00FF00. Its layout is tabbed, the workspace keeps its splith layout.
After a new terminal is opened:
LVDS1|output|output|
topdock|dockarea|dockarea|
content|splith|con|
1:test|splith|workspace|
#00FF00|tabbed|con|
Terminal|splith|con|
Terminal|splith|con|
bottomdock|dockarea|dockarea|
i3bar for output LVDS1|splith|con|
The terminal is created in the new #00FF00 container.
Introspection of a workspace with split layout
Initial, with one terminal opened:
LVDS1|output|output|
topdock|dockarea|dockarea|
content|splith|con|
1:test|splith|workspace|
Terminal|splith|con|
bottomdock|dockarea|dockarea|
i3bar for output LVDS1|splith|con|
After switching to splith layout:
LVDS1|output|output|
topdock|dockarea|dockarea|
content|splith|con|
1:test|splith|workspace|
Terminal|splith|con|
bottomdock|dockarea|dockarea|
i3bar for output LVDS1|splith|con|
Note no additional anonymous container is created in this case.
After a new terminal is opened:
LVDS1|output|output|
topdock|dockarea|dockarea|
content|splith|con|
1:test|splith|workspace|
Terminal|splith|con|
Terminal|splith|con|
bottomdock|dockarea|dockarea|
i3bar for output LVDS1|splith|con|
The parent of the new terminal is just the workspace (as expected), not an intermediate container.
The same when switching splitv, there is not additional container created (this case is not shown here, for readability).
Conclusion
An anonymous container is created only when switching the workspace layout to tabbed ...
Workspaces do not have layouts. The space within a workspace is call a container, which you can change the layout to splitv, splith, stacked or tabbed. You probably need to rephrase your question as it is not very clear. Could you made an example, you may want to include a diagram of text characters
@phairland, I added an example case.