Hi!
I’m trying to do a quick hack for an Exposé-like function using FvwmRearrange. I know Exposé has been discussed in the forums before, but I do not want to use some CPU-consuming take-screenshot-of-all-windows programs and besides the issue here generalizes to other functions. What I have up to now:
DestroyFunc Expose
AddToFunc Expose
+ I SetEnv FVWMCountWindows 0
+ I All (CurrentPage, !Iconic, CirculateHit, !Sticky) PipeRead 'echo SetEnv FVWMCountWindows $((FVWMCountWindows + 1))'
+ I PipeRead 'echo ModuleSynchronous FvwmRearrange -tile -maximize -m -mn `echo -e "sqrt\($FVWMCountWindows\)+1" | bc`'
+ I Pick DeExpose $[w.id]
DestroyFunc DeExpose
AddToFunc DeExpose
+ I All (CurrentPage, !Iconic, CirculateHit, !Sticky) Maximize Off
+ I WindowId $0 WarpToWindow 50 50
The first funtion arranges the windows in a matrix and then should prompt the user to select a window. When this happens the windows return to their normal position and size (here is a problem with already maximized windows, I know, but it’s only a first try). My problem is that when I call the Expose function, I inmediately get the window selection cursor and only afterwards the windows get rearranged. I tried with the ModuleSynchronous command and with Schedule, but it doesn’t seem to work (at least reliably). Any ideas?