Finding the right name to Wait on

I make extensive use of Wait in my application start functions so that I can place applications on the right virtual desktop screen pages. However, it turns out the Slack client running in Google Chrome is a bit of an obnoxious git in this regard, which results in either InitFunction hanging waiting for the right window name until I hit Ctrl-Alt-Esc, or Chrome/Slack starting up on the wrong screen. I’ve tried wildcards like Slack and chrome without success.

Does anyone have any tips on making Chrome play nicely for Wait? I never expected this to be the hard part of the problem.

Using Wait to do this is now considered erroneous. I’ve spoken at length about this in the past. See my monologue on FVWM’s startup procedure.

In your case, use InitialMapCommand.

OK, gladly. Would you happen to have a pointer to said monologue handy? If there is a better way to do it, I am TOTALLY in favor of doing it the better way.

In the meantime I’ll look for documentation on InitialMapCommand.

Hmmmm… I’m not actually seeing how to make that work for me in this case.

Here’s an overview of what I’m trying to do: I have a 4x4 plane of virtual desktops. (…Well, actually, I have FOUR 4x4 planes, but almost never use any but the first one any more.) My InitFunction starts seven fixed applications (windows are always in the same place on the same virtual screen), plus running a number of ancillary commands (xset, xmodmap, …), plus one or more “variable” applications. It’s these “variable” applications that are relevant. On weekdays, Slack gets started on desktop (1, 1) and pidgin gets pushed to (0,1). On weekends, the goal is to not start Slack at all, and start pidgin on (1,1) instead. But if I get called in on the weekend, then I’ll need to start slack, and it’ll get started on a different screen, maybe (2,1). If I start it manually from the desktop menus, I need it to start on whatever screen is current. So it doesn’t seem that I can use a Style to solve the problem, because the Style is going to get applied to all instances regardless of where started from, and that isn’t going to work.

Right now, I have it all working EXCEPT that InitFunction either waits forever for the correct window title to ‘appear’, or — without a Wait — moves on to the next screen and the next launch before Chrome’s window actually gets mapped, which messes everything up.

…Hmmmm. I don’t suppose I can tell fvwm to wait for ANY new window to map, can I…?