pkulak / filtile

A layout manager for the River window manager.
GNU General Public License v3.0
11 stars 2 forks source link

[Feature request] Add option to customize padding when there is a single view visible (aka "smart gaps") #3

Closed itshog closed 6 months ago

itshog commented 7 months ago

First of all, thank you for the project!

A feature I'm missing in River compared to other compositors and window managers is the ability to disable gaps and borders when there is a single view visible on the selected tags, like when in monocle mode. Other layout generators implement smart gaps by having a specific flag which enables/disables this feature: instead, a much more flexible solution would be IMO to allow customizing the values of view-padding and outer-padding when there is a single view visible, by having two additional commands (for instance view-padding-single and outer-padding-single). This would allow for a greater level of customization, making it possible not only to have smart gaps functionality but also to fine-tune the appearance and behaviour of tags which have a single view visible (especially when combined with the pad command).

I also have an idea for emulating smart borders behaviour (which AFAIK isn't possible to achieve "cleanly" at the moment due to River's architecture) which depends on this feature, but I think it should go in a separate issue.

pkulak commented 7 months ago

Hmm... this is interesting, because it could replace a feature I already have where you can pad single windows to keep them from becoming excessively wide. Smart gaps have always been in the back of my mind, but I'll have to think if doing it this way is a better idea, and if it would totally replace an existing way to do things.

itshog commented 7 months ago

Hmm... this is interesting, because it could replace a feature I already have where you can pad single windows to keep them from becoming excessively wide. Smart gaps have always been in the back of my mind, but I'll have to think if doing it this way is a better idea, and if it would totally replace an existing way to do things.

Thanks for the reply. IMO this feature shouldn't replace the pad command, which is extremely useful but serves a slightly different purpose. In fact, I think letting the user combine freely these two features is the best course of action, as it will increase the flexibility and customization offered by the layout generator.

pkulak commented 6 months ago

I took a stab at this. I didn't see the point in adjusting the inner gaps when there's one window (no inner at that point, really), but I did want to see what would happen if you could adjust horizontal and vertical gaps independently. It's kinda cool. You can make it like pad, but even more configurable.

And like you said, the layout manager can't control the borders, so unless you never have a border, smart-padding=0 doesn't look so great... but you can do it!

I'm also conflicted on weather to apply smart padding when there's more than one window, but they are all still on the main stack. I stuck with only applying when there's one window for now.

itshog commented 6 months ago

Amazing!