[*]I am trying to write a function which would do the following:
- If no instances of gedit or firefox or nautilus are running, launch one
- If there is one, bring the window on top and give it focus
- If there are two or more, circulate through them, rising them on top and giving them focus
What I have so far is:
[code]
This one is from manual:
DestroyFunc WinToTop
AddToFunc WinToTop
- I Layer 0 ontop
- I Raise
This is what I wrote:
DestroyFunc LaunchRaiseSwitch
AddToFunc LaunchRaiseSwitch
- I None (gedit) Exec exec nautilus --no-desktop
- I Next (gedit) WinOnTop
Key F A 4 Function LaunchRaiseSwitch[/code]
It would not launch gedit if one is running, which is good. But it would not circulate through gedit windows, it would only switch to next one or two and then stop, while “Fvwm stores windows in a ring internally.” (manuals) and ‘Focus’ instead ‘WinOnTop’ does what I want (but does not raise the window, just circulates)
Where did I go wrong?