FVWM: SnapGrid offset?
Stephen Talley <[email protected]> Sun, 6 Apr 2025 13:32:13 -0400
| Newsgroups | gmane.comp.window-managers.fvwm |
|---|---|
| Message-ID | <ns2dtroolcwetlppprivc4fkcvhhdtgpbo3pfbjspcy3g2zavg@qimyg7epfug6> |
I have a custom function to move icons:
DestroyFunc MoveIcon
AddToFunc MoveIcon
# Set icons to snap to grid exlusively
+ I WindowStyle SnapAttraction 0
+ I WindowStyle SnapGrid $[ICONWIDTH] $[ICONHEIGHT]
+ I UpdateStyles
+ I Move
# Reset snap settings for normal windows
+ I WindowStyle SnapGrid 0 0
+ I WindowStyle SnapAttraction $[SNAPPROXIMITY] Windows Screen
This allows me to snap icons into a grid while moving them,
Recently I decided to right-align my icons along the screen instead of left. But since my screen resolution is not a multiple of $[ICONWIDTH], the above function now snaps the icons slightly off the screen while moving them along the right edge.
It appears the SnapGrid is anchored at 0, 0. Is there a way to provide an offset? I don't want to change my grid size, just the offset of where the grid is anchored.
╰─> fvwm --version
fvwm 2.7.0 compiled on Sep 8 2024 at 19:34:08
with support for: ReadLine, RPlay, Stroke, XPM, SVG, Shape, XShm, SM, Bidi text, Xinerama, XRender, XCursor, XFT, NLS
Thanks,
Stephen