PaperWM
PaperWM copied to clipboard
Vertical size is reset when consuming windows (Super-I)
I may have several terminal windows sized a particular way, vertically tiled in a column. If I add another terminal via super-enter, super-i, it resets all the existing sizes. This is fairly frustrating behavior. I suppose I am used to other tiling WMs, where it will typically just take 50% of the focused/bottom window/container which I think is the more intuitive behavior. I wonder if there is a way to accomplish this in PaperWM.
Yep, the vertical tiling lacks a bunch of features. It basically suffers a bit from me and @olejorgenb not using it all that much. The code also gets a bit tricky because we need a bunch of ad-hoc hacks to handle windows that can't be pixel sized (eg. gnome-terminal).
The code for basic vertical tiling is here: https://github.com/paperwm/PaperWM/blob/f6e9ab4d901e00ade4acb1caef28e33b31540c59/tiling.js#L304
Yeah, I guess if you actually have room for more than two terminals, that behavior might make sense. Particularly when drag-n-dropping. Slurping 4 windows would create a rather useless layout on my monitor :smile: [1]
I personally almost never tile more than two windows (partly because most gnome themes really like very large title-bars, and I've simply succumbed to this instead of trying to find/tweak a theme)
If you want to experiment, I think this is the best place to start: https://github.com/paperwm/PaperWM/blob/f6e9ab4d901e00ade4acb1caef28e33b31540c59/tiling.js#L3267
You basically have to implement your own "column allocator" which allocates the actual window height to all windows except the two last windows (assuming the current window is the top-window.
A similar strategy is needed for barf.
[1]
