The i3 FAQ has migrated to https://github.com/i3/i3/discussions. All content here is read-only.
Ask Your Question
0

2x2 window arrangment

asked Jun 18 '14

anonymous user

Anonymous

Is it possible to reach, say, from this arrangement:

|1|2|3|4|

this one:

|1|2|
|3|4|

?

3 answers

Sort by » oldest newest most voted
2

answered Jun 20 '14

ANOKNUSA gravatar image

Every window is drawn within a container. You can split a container vertically, then move the window next to it into the newly split container. Open four windows, split the first and second, and move the third and fourth into them as desired.

3

answered Jun 20 '14

Just to sum up both answers: They are both working but there is a difference in the resulting layout tree:

  • ynimous' solution (without window 5) creates a row-wise layout, ie. if you focus window 3 and execute a focus parent you get the row holding 3 and 4
  • ANOKNUSA's solution creates a column-wise layout, that is by focusing window 3 and executing a focus parent you get the column with 1 and 3

Use whatever seems better to you. Personally I like the first approach better since it comes with less keyboard action (depending on which window you are starting in; worst case: 8 key combinations vs. 12)

Comments

How did you quantify that? What's the "worst case" you're referring to? I'm just curious, I'm not looking for a debate here. ;) It's just that there are several variables to account for, and I can't think one way would be quantifiably "simpler" than the other.

ANOKNUSA gravatar imageANOKNUSA (Jun 20 '14)edit

worst case is referring to the number of movements I have to make. example: your workflow starts with splitv in window 1. Worst case would be I have window 4 focused, so using just keyboard I need three times `move left` to get there.

mschaefer gravatar imagemschaefer (Jun 21 '14)edit

You're right, though to be fair that assumes the windows are always in the same order from the start and you care about what order they end up in. It's probably moot now though; with the new layout saving feature, a script can do it all in one keystroke.

ANOKNUSA gravatar imageANOKNUSA (Jun 21 '14)edit

I just thought the same when I read about the layout saving feature ;-)

mschaefer gravatar imagemschaefer (Jun 22 '14)edit
1

answered Jun 18 '14

ynimous gravatar image

One solution I found is:

focus 3
move down
splith
create new window (say 5)
focus 4
move down
close window 5

Maybe there is another one which does not require opening a new window?

Comments

The same sequence works for me without window 5.

cee gravatar imagecee (Jun 18 '14)edit

That's strange... For me this sequence results into three rows: i) |1|2|, ii) |4| iii) |3| That is, when window 4 is moved down it is not merged down it creates another container that includes only 4.

ynimous gravatar imageynimous (Jun 19 '14)edit

@ynimous: I think you forgot the `splith` when leaving out the creation of window 5. Without splith I also get you 3-row-layout, but with splith I get exactly what you want

mschaefer gravatar imagemschaefer (Jun 19 '14)edit

Indeed it works. Thanks!

ynimous gravatar imageynimous (Jun 19 '14)edit

Question Tools

Stats

Asked: Jun 18 '14

Seen: 317 times

Last updated: Jun 20 '14