bspwm
bspwm copied to clipboard
Resize windows according to WM_NORMAL_HINTS
Would be nice to obey "program specified resize increment: X by X" from WM_NORMAL_HINTS. I need it for terminal windows with apps which set their own background color like Vim. Unless the window size is product of char size I get stripes of the terminal's background like discussed there - https://www.reddit.com/r/neovim/comments/tomcpl/black_lines_between_neovim_and_kitty_terminal/ The terminal program like Kitty actually provides the hint about its char size via xprops.
#111 was a related issue
check honor_size_hints
config
check
honor_size_hints
config
Thanks! That almost works. Problem now is that I can't grow window with increment lesser than hint suggests. While shrinking works as I do like, i.e. if step required by control command is too small, it would shrink by size of one cell. As a result, I can shrink but cant grow with hotkeys. I believe growing logic should be corrected.
Problem now is that I can't grow window with increment lesser than hint suggests.
i had forgotten all about that. it's really unfortunate.
I believe growing logic should be corrected.
seems like no small hack because of how apply_size_hints
gets run (you could shoehorn something into messages.c as a special case though -- horrible POC of that here.)
maybe the simplest fix would be a script to check for honor_size_hints
and check/grab the size increment like read _ w h < <(xprop -id "$THEWINDOW" -f WM_NORMAL_HINTS 32mii ' $9 $10' WM_NORMAL_HINTS)
for the --resize
. that might be too horrible though.
late addition: i think this might be a nice balance between horrible hack and functional fix