You’ve actually answered your own question in many respects, although you’re going to run into a problem. The concept of “before” and “after” an action within a function is a known concept – and something I have documented extensively on the fvwmwiki about synchronisation. You can read a little bit about it here:
You might find yourself in a timing issue, but by all means try some of the suggestions therein. Note that because of the way functions work in FVWM, they grab the pointer which means performing operations pre and post on a window is something of a misnomer anyway.
Here’s an example of a contrived example:
DestroyFunc a
AddToFunc a
+ I WindowStyle Sticky
+ I UpdateStyles
+ M PipeRead 'echo Move'
+ M Exec exec xmessage "Afterwards"
Note what’s happening here. The above says that immediately, the window is to be sticky, and the updated style applied immediately as well (as opposed to post-function ending). The window is to then be Moved if Motion is issued on it, and xmessage is run with the message ‘Afterwards’.
The crucial thing to learn there is that xmessage will always display after the window has finished being moved because PipeRead blocks FVWM from doing anything until it completes – it inherently gives us the scheduling factor needed here.
Since you haven’t said in your example how you plan to make the window transparent (I assume via transset-df or what have you) then you will have to ensure that you do something like this:
DestroyFunc b
AddToFubc b
+ I PipeRead 'echo Exec exec whatever -options'
+ M PipeRead 'Move'
+ I Exec exec foo .... -options
I tried out some functions using your hints. The following one is working well with fvwm 2.5.18 (current gentoo stable) and transet-df-5 from forchheimer.se/transset-df/.
I PipeRead ‘echo Exec exec transset-df -i $[w.id] 0.7’
M PipeRead ‘echo Move’
M Exec exec transset-df -p 1[/code]
doen’t work for me. I figured out, that problem is transset-df -i $[w.id] 0.7 command. When I execute it in zsh i get this error: