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

What' the point that child container can have the same split mode with its parent?

asked 2013-08-28 14:24:42 +0000

Havoc gravatar image

updated 2013-08-28 15:33:17 +0000

Hi, i have moved to i3 wm recently from wmii. And i really like it. One thing i can not understand about i3 is: when a container split to vertical mode, like:

A | B

Then its child B can also be split to vertical mode:

A | [ B|C ]

This is very confusing sometime. It's not easy to find the relationship between A, B ,C quickly. There are just look exactly same as A,B,C in same level:

A | B | C

In my opinion, if a parent is in vertical mode, its children should be automatically switched to horizontal mode. Then "mod+h" and "mod+v" can be reduced to 1 key-binding. This could ease a lot of things.

Maybe i am not fully familiar with i3 yet. Please tell me if there some good reasons.

Thank you very much.

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted
0

answered 2013-08-28 17:27:22 +0000

Havoc gravatar image

Hi, DocOC

I will put my reply here, because the length of comments is limited.

I agree with you that tree structure is more powerful than column/row structure. That's why i like i3 so much.

But when you split a window, the choice between hsplit and vsplit is actually unnecessary.

Suppose you are in [A|B] layout, if you open window C , it will just appear at the rightside of B, get a result of [A|B|C].

If you press "vsplit" key, then open C, you get [A|[B|C]], but this is nearly the same result in the users view.

So, in this situation, the "vsplit" key is kinda redundant.

You only need to press "hsplit" key when you need B and C is split up and down.

So my suggestions is there is only one command "split", bind to one key. You will automatically get the hsplit if the parent is vsplit, and vice versa. This could save alot of time for your brain to "decide which kind of split" and "chose the right key between mod+h and mod+v"

P.S. In some rare case, you really want [A|[B|C]], rather than [A|B|C], you just first get the hsplit B and C, and use mod+s to toggle it. That's no problem.

edit flag offensive delete link more

Comments

There is a differenece. If you create windows without using the split key, you have 3 equal size windows. If you open two windows, then use the split key, you end up with one window half the size of the display, and two other windows 1/4th the size of the display. Forgive my curtness, limited space.

DocOC gravatar imageDocOC ( 2013-08-28 20:16:37 +0000 )edit

This can also be achieved without vsplit. First you get [A|B|C] by just open C. Then just resize them as you wish. Because even if you get a 1/2:1/4:1/4 ratio, it's not usually exactly what you want, you are likely need resize also. So in conclusion, vsplit still kinda redundant. :)

Havoc gravatar imageHavoc ( 2013-08-29 01:05:21 +0000 )edit

After some thinking. I suggest maybe can add another 2 functions besides "split v" and "split h", which are "split perpendicular" and "split parallel". First one will split a window to the different mode of parent, another to same mode. In most case, "split perpendicular" will be enough.

Havoc gravatar imageHavoc ( 2013-08-29 03:59:20 +0000 )edit
0

answered 2013-08-28 16:34:19 +0000

DocOC gravatar image

The reason is that once you split the parent container, you are not actually creating a child container until you change the split. So, A | B | C, are all children of the same parent container, instead of B and C being children of a new container. i3 is different from other tiling window managers in that it uses a tree structure for container heirarchy, instead of a static colum / row structure. This is wonderful, because you can create infinitely complex structures, without being constrained to a particular static layout.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2013-08-28 14:24:42 +0000

Seen: 384 times

Last updated: Aug 28 '13