How to create a split with already existing windows?
sim590 opened this issue · 7 comments
I see that I can use win+v
to create a vertical split with win+enter
, but what about creating (changing) the split orientation with already existing windows?
I'm not sure I understand could you clarify?
We can do the following (first method):
- Spawn a window using
create_tile
(mod+Enter). - Configure next split in vertical mode with
set_layout_vertical
(mod+v) - Spawn a window using
create_tile
(mod+Enter)
Then the split between the first window and the second is vertical.
But we can't do:
- Spawn a window using
create_tile
(mod+Enter). - Spawn a window using
create_tile
(mod+Enter) - Make the last split vertical
In this situation, from state of (3), if one wanted the split vertical between the last two windows, the only choice would be to close the second window and start from (2) from the first method and fix the layout. But the state of the second window was lost because we had to close it.
The thing is you may have a bunch of windows opened in some layout, but you might want to change the layout at some point. For now, the only way to change the layout is to close all windows (so lose the state for every windows already opened) and restart from the begining using the first method and not make any mistake in spawning the right windows in the right order because you can't change the layout afterwards.
Or else, I don't understand how it's done by reading the doc:
You can use mod+shift+d or flip_workspace to flip the workspace, though this applies it to the whole workspace
https://mcyoloswagham.github.io/win3wm/hotkeys.html#flip_workspace
Yes. That is unfortunate. It would be interesting (as I think it is possible in i3) to change the orientation of the next split but not flip the whole layout.
https://mcyoloswagham.github.io/win3wm/hotkeys.html#bsplit
That's already an option, it's called Binary Split (I took this name from yabai)
In my last message, I meant last and not next in:
change the orientation of the next split but not flip the whole layout.
@McYoloSwagHam: I would very much like to use this window manager since it seems to play better with windows than Workspacer. But this feature I'm talking about is missing.
In your last message, you replied with bsplit
, but this opens a new window in vertical split. What I'm looking for is from a setting where you have already two windows opened (among more windows) and to put the second window under the first window. For example, in Sway (a window manager honoring i3 conventions in Wayland), we could have this:
where you can see respectively VIM, Qutebrowser and two other terminals opened. From there, everything is in the same container split horizontally. I don't want to change the orientation of that container. I want to go from there to:
Where the first window and the second window are now in a new container that is vertically split. That same container is itself with the other two terminals still in the same horizontally split container. So you have this hiarchy:
[H]
/\ -\
/ \ ----\
| | \
[V] | \
/\ urxvt urxvt
/ \
/ \
/ \
Vim Qutebrowser
In short, when my winwm cursor is on the first window on the left and that I do the following from the first setting:
- mod+v (split vertically, so create a new container containing the selected window alone)
- mod+l (move the cursor to the second window on the right)
- mod+shift+h (move the window to the left, so under the new vertically split container)
Then I should obtain the second setting. Therefore, what I mean is that mod+v should not create a vertically split container only if a new window is spawn right after. But the container should simply be created. Then, I should be able to drag a window from wherever in my workspace and put it in the vertically split container so that the windows become vertically split. In other words, splitting vertically shouldn't be restricted or tied to the action of spawning a window. Therefore, mod+v should just create a vertically split container.
This is a huge gap that is present in winwm since you just can't change the orientation of split of some windows, but only all windows at a time or only newly create windows. I can't just know in advance which orientation I need for my windows before spawning them. First, I spawn them, then I change the orientation on the go, so I really need that feature. I think that it is quite a fundamental idea of i3 which is missing in your implementation.
N.B: there are edge cases to take into account. For example, if you press mod+v twice or more, then only one container should be created. We don't need to stack containers arbitrarly many times without first putting some other windows in the container. But that's an implementation detail.
Do you understand better what I mean now?