Hello,
I have tried to configure fvwm so that it behaves the same as other window-manager on resizing and moving: When pressing ALT, clicking into a window with the left mousebutton should move the window, clicking the right mousebutton should grep the nearest edge (or border, what I had to add to the shellscript) of the window and do a resize.
Below you see the configuration for this. The attached script (that certainly has to be executable and stored in the search path; it probably requires bash.) calculates the nearest corner and prints out the statement to move the mouse cursor to it.
Moving works fine. On resizing the problem is that you have to release the right mousebutton before resizing is started. Is there a way to change this behaviour to directly starting the resizing on mouse press?
(I have started this experiments some months ago, but did not find the time to work on it for longer now)
Thank you,
Gert
#---- Alt+Mouse to handle windows. DestroyFunc MyMove AddToFunc MyMove + M Move + C RaiseLower
DestroyFunc MyResize AddToFunc MyResize + I StoreMousePos + I WarpToNearestEdge + I Resize + I RecallMousePos
DestroyFunc StoreMousePos AddToFunc StoreMousePos + I SetEnv POINTERX $[pointer.wx] + I SetEnv POINTERY $[pointer.wy]
DestroyFunc RecallMousePos AddToFunc RecallMousePos + I WarpToWindow $[POINTERX]p $[POINTERY]p
DestroyFunc WarpToNearestEdge
AddToFunc WarpToNearestEdge
+ I PipeRead `FvwmWarpToNearestEdge $[w.width] $[w.height] $[pointer.wx] $[pointer.wy]`
Mouse 1 WTSF M MyMove Mouse 3 WTSF M MyResize
#!/bin/bash
# required Parameters: # $1 w.width # $2 w.height # $3 pointer.wx # $4 pointer.wy # some default, just to be sure. WARPX=100 WARPY=100 # define x position if [[ $[ $1/2 - $3 ] > 0 ]]; then WARPX=0; else WARPX=100; fi # define y position if [[ $[ $2/2 - $4 ] > 0 ]]; then WARPY=0; else WARPY=100; fi echo "WarpToWindow $WARPX $WARPY"
