Amethyst
Amethyst copied to clipboard
Support for horizontal window resizing, not just vertical
One feature I would like is to be able to proportionally resize a window within the left or right columns.
Example: I have two windows in my left (primary) column, each taking 50% of the space. I then press mod2 + j to resize the focused window to be 70% of the column.
Likewise, if I have three windows open in my right (secondary) column, they start out as each having 33% of the window. After pressing mod2 + j, I resize the top one to be 50%, so the remaining two windows have 25% each.
This would probably have to be a more sophisticated tall layout.
Just to make clear, what we are incrementing for each window is a weight. Default weight = 1. Add 0.2 to the weight for each press of mod2 + l. Subtract 0.2 for each press of mod2 + h with a floor of .2. (Alternatively, multiply by 1.25 or .80, respectively). When determining window heights, normalize the weights as a percent height:
height[i] = screenheight * weight[i] / sum(weight[])
Thus the only hard thing is keeping track of each each window.
Interesting, since we keep track of the windows in an array, one way would be to keep a mirrored array with the corresponding indexes mapping to their weight.
It might be easier to track it as a property on the window directly like we do with floating. Just track a window weight and have layouts that use it in whatever way is desired.
This is a feature I would very much like to see as well. Coming from i3, this missing feature is perturbing :)
This is what I miss most from using xmonad on linux, would love to see this happen!
There doesn't seem to be a data structure in place for subdividing the areas, just a single "ratio" as defined by the protocol.
As an attempt, here is a snippet that I considered during development of #627 (but was eventually scrapped in favor of the ResizeRules
struct).
/*
A tiling window manager must have some concept of constraint:
a "primary" frame boundary bisects the entire screen, with
successive boundaries bisecting less than or equal distances
(e.g. BSP would bisect the full screen, 1/2, then 1/4...
but a column layout would bisect full, full, full, etc)
This data set captures the "rank" of a frame, and each constraint.
- a "primary" frame on a layout like "Tall" will be [horizontal]
- a "secondary" frame on a layout like "Tall" will be [horizontal, vertical]
- a "secondary" frame on a layout like "Column" will be [horizontal, horizontal]
- a "tertiary" frame on a layout like "Middle" will be [nil, horizontal, horizontal]
Note that in practice, the only values that matter are the max-indexed horizontal
and vertical values. Hence, values are optionals.
i.e. [horizontal, horizontal, horizontal] equates to [_, _, horizontal]
[vertical, vertical, horizontal, horizontal] -> [_, vertical, _, horizontal]
Additionally, we include the number of frames in that frame rank -- there may be multiple
primary or secondary or tertiary frames sharing the same space.
*/
typealias FrameConstraint = (unconstrainedDimension: UnconstrainedDimension?, frameCount: Int)
typealias RankedConstraintList = [FrameConstraint]
+1 for adjusting height of tiles!
bump
Would definitely love to see this feature as well!
Would love to see this!
Big ➕
Well, a big ➕ by me too, coming from i3 it seems an essential feature to have, are there any workaround ?
Yabai supports this feature (https://github.com/koekeishiya/yabai)
Thanks a lot @vespakoen i'll give it a try!
Here is my (old) config that mimics monad a bit in case it's useful: https://github.com/koekeishiya/yabai/issues/295
I think this should be possible now with #1134.
Has anyone had success implementing this using a custom layout? Bonus points if you are using a tall layout for it.
For what it's worth, I think this is a case for a more fully featured binary space partitioning, which is possible with a custom layout, but yabai is bsp out of the box.
It would be interesting if someone did do full bsp as a custom layout, but I think I will close this as it is probably outside of the scope of the native app.