Airblader / i3

A fork of the i3 window manager with gaps and some other features. :warning: i3-gaps has been merged into i3.
BSD 3-Clause "New" or "Revised" License
5.87k stars 318 forks source link

Window specific gaps #379

Closed maxfrei750 closed 1 year ago

maxfrei750 commented 3 years ago

I'm submitting a…

[ ] Bug
[x] Feature Request
[ ] Documentation Request
[ ] Other (Please describe in detail)

Current Behavior

AFAIK, gaps can only be applied globally or to specific workspaces.

Desired Behavior

It would be great, if gaps could be applied also to windows, e.g. something along the lines of

for_window [class="firefox"] gaps horizontal 100

Environment

Output of i3 --moreversion 2>&-:

i3 version: 4.19-15-g9c865286
- Linux Distribution & Version: ManjaroLinux 20.2
- Are you using a compositor (e.g., xcompmgr or compton): picom
Airblader commented 3 years ago

Thanks for the idea, but (much like upstream i3) I'm not looking to add more features like that into i3-gaps at this point. I'll leave this open for now for visibility, though.

maxfrei750 commented 3 years ago

I see. Thanks for letting me know. And while I'm at it: Thank you for your great work!

One last thing: If someone was to implement this feature, how much work do you think it would involve?

Airblader commented 3 years ago

You'd have to use the gaps data structure on non-workspace containers, which infrastructure-wise is in place. In calculate_effective_gaps in src/con.c you'd have to change it to look at the gaps configured on the container¹ as well. Then you have to decide on if or how you want to merge it with workspace-level configuration. These things probably require a couple decisions to be made, but should otherwise not be difficult. Another decision, partially dependent on these, is how to handle changes to the "global" gaps configuration for child containers – you can ignore it, merge again, …

The rendering of the gaps itself, I assume, should work as-is.

¹ And potentially parents, depending on how you want to design this feature

0Karakurt0 commented 3 years ago

You can simply ignore them. It would work like boxes inside other boxes - from existing gaps you calculate window-specific gaps. I just tried to make closing animation using gaps, but since they don't work... meh. Thank you anyway!

Airblader commented 1 year ago

I'm closing this issue has i3-gaps is being migrated into i3. If this issue still applies, please reopen it in i3.