I would like to maximize a window with snaping it to an edge.
Is there a way to test snap events and link it to a function?
or
-is there a way to bind an action to edge when a window hit the pan frames (like pointer but… a window… border.
or
You cannot test for snap events, so there is no event to tiger when you snap an event to the edge. So I cannot think of any way to trigger an action when a window hits the edge of the screen.
Is it feasible to detect if a window has been snapped and to which edge, subsequently triggering a specific action? Additionally, since snap attraction activates when windows are within 15 pixels of each other, is it possible to implement a low-overhead watcher that executes an action when a window is precisely at that distance or closer, but not overlapping?
The server is being grabbed during this operation, so performing other actions at the same time would be very confusing.
The reason snap attraction works is because we know the position of all the other windows in both X and Y directions, and can therefore test when to snap to other windows.
What we could do is add variables to indicate if a window is at a screen edge, and let the user use those in a function. Perhaps we can introduce $[w.edge.L], $[w.edge.R], $[w.edge.T], $[edge.B] – for (L)eft, (R)ight, (T)op, (B)ottom, and then you can combine tjhat with $[w.screen], etc.