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 2014-06-18 19:15:50 +0000

anonymous user

Anonymous

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

|1|2|3|4|

this one:

|1|2|
|3|4|

?

edit retag flag offensive close merge delete

3 answers

Sort by ยป oldest newest most voted
2

answered 2014-06-20 05:06:27 +0000

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.

edit flag offensive delete link more
3

answered 2014-06-20 08:36:38 +0000

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)

edit flag offensive delete link more

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 ( 2014-06-20 14:10:08 +0000 )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 ( 2014-06-21 11:28:51 +0000 )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 ( 2014-06-21 19:53:50 +0000 )edit

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

mschaefer gravatar imagemschaefer ( 2014-06-22 09:58:00 +0000 )edit
1

answered 2014-06-18 19:39:07 +0000

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?

edit flag offensive delete link more

Comments

The same sequence works for me without window 5.

cee gravatar imagecee ( 2014-06-18 22:51:23 +0000 )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 ( 2014-06-19 06:10:03 +0000 )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 ( 2014-06-19 11:54:30 +0000 )edit

Indeed it works. Thanks!

ynimous gravatar imageynimous ( 2014-06-19 18:39:31 +0000 )edit

Question Tools

Stats

Asked: 2014-06-18 19:15:50 +0000

Seen: 317 times

Last updated: Jun 20 '14