sminez / penrose

A library for writing an X11 tiling window manager
https://sminez.github.io/penrose/
MIT License
1.27k stars 88 forks source link

Smart gaps and borders #226

Closed ZaheenJ closed 2 years ago

ZaheenJ commented 2 years ago

Is your feature request related to a problem? Please describe

When there is only one window one screen some think that it is wasteful to have gaps and borders as there is no need to separate multiple windows. Coming from dwm (where I applied patches for this behavior) I was vey used to this, and I think i3 and awesomewm also have this feature.

Describe the change / addition you'd like to see made

There should be two booleans, smart_gaps and smart_borders, which should be available to the user to set. I think that these should be in LayoutConf since gapless is already there and that allows someone to configure these per layout but it also could be implemented in Config. They could be disabled by default so people's configs wouldn't have to change, but either way small changes to core would have to be made. Here is my fork with it implemented for LayoutConf but it could easily be switched to Config I think if you're interested.

Describe alternatives you've considered

At least for the gaps, you could set gapless: true for the monocle layout and then make a hook which checks whenever a client is added or removed if there is only one client and then switch to monocle but then when you add another client it would have to remember the previous layout which feels clunky.

sminez commented 2 years ago

Better handling of gaps is provided in the rewrite branch which is hopefully merging to develop in the near future.