forge icon indicating copy to clipboard operation
forge copied to clipboard

feat: optimize layout based on container rect

Open maymage opened this issue 2 years ago • 2 comments

Hi all,

so when I am in a triple tiled state, say

-------------------------
|              |        |
|              |    B   |
|      A       |--------|
|              |        |
|              |    C   |
|              |        |
-------------------------

and I kill window A, I may end up in a horizontally tiled state

----------------
|      B       |
----------------
|      C       |
----------------

while due to my screen layout, i.e. a laptop with more horizontal than vertical space, I would prefer B and C to be tiled vertically, i.e.

-------------------------
|           |           |
|           |           |
|           |           |
|      C    |     B     |
|           |           |
|           |           |
|           |           |
-------------------------

Can this - or the vice versa case, when having more vertical space, be adressed also in more complicated situations,

  • automatically from detecting the screen layout
  • be implemented as an option

?

maymage avatar Apr 19 '23 21:04 maymage

Hello @maymage, in your example, when window A is closed, you want B and C to be side by side if the screen's width is larger than its height?

What if B is a container with two more windows D and E? How would they be positioned? I think all windows would be repositioned if we consider the container's dimensions.

jmmaranan avatar Apr 20 '23 00:04 jmmaranan

..in your example, when window A is closed, you want B and C to be side by side if the screen's width is larger than its height?

Yes, exactly!

What if B is a container with two more windows D and E? How would they be positioned? I think all windows would be repositioned if we consider the container's dimensions.

I think passing from

-------------------------
|              |    |   |
|              |  D | E |
|              |    |   |
|      A       |--------|
|              |        |
|              |    C   |
|              |        |
-------------------------

to

-------------------------
|              |        |
|              |    D   |
|              |        |
|      C       |--------|
|              |        |
|              |    E   |
|              |        |
-------------------------

would be most natural - as the relative size is preserved.

maymage avatar Apr 20 '23 05:04 maymage