i3
i3 copied to clipboard
Window specific gaps
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
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.
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?
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
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!
I'm closing this issue has i3-gaps is being migrated into i3. If this issue still applies, please reopen it in i3.