You have to be able to identify the window you want with a unique name/class/resource. Some programs have an option to set a class, such as -class, that you can use for that. I would look to see if you can configure the window you want to maximize in such a way you can distinguish it so you can use a style for it.
The other option is to write a launcher script, that runs the program, then uses the Wait command, and then maximizes the window that was just launched. I’m unsure on the details, but this should be possible to write something that works.
I now see what you’re saying, as I forgot it was preceeded by the InitalMap keyword.
I was thinking about this, and I understand that I can run a test for Init during the startup function. But I have several steps involved in my InitFunction, and for every step I would need to Test (Init) before doing what it needs to do. Seems I would be adding an extra step to every step I take, and after several lines of code, I can see this adding up.
But it doesn’t say I can’t. If I knew why using Test (Init) is better than using an InitFunction, I might feel better about using it. I’m not complaining or trying to start something, I just don’t get it.
You can make a bowl of cereal by getting a bowl, getting the milk, getting the cereal, getting a spoon. Or you can test if you have a bowl, then get the bowl. Test if you have milk, then get the milk…
It’s to do with function context, and execution. If you mix/match
, FVWM won’t internally aggregate those in order – there is a greater chance you won’t get the results you expect. This was largely why StartFunction and Test learned these things, and hence why you should use StartFunction.
I see what you’re saying. So the problem only lies in using both methods at the same time. FTR, As soon as I create an InitFunction, there is no need to keep anything in the StartupFunction with Test (Init).