This is a symptom of "factory windows". spawnOn can't work for them, you need to find out the application-specific way to attach distinct identifiers to windows, because _NET_WM_PID will never match for any but the first window opened (and sometimes not then). And no, neither spawnOn nor any similar mechanism will be able to find a "fix",, because "application specific" — and even then not every application bothers to provide a mechanism to label specific windows.

On Sat, Nov 2, 2019 at 5:39 AM Adam Sjøgren <asjo@koldfront.dk> wrote:
  Hi,

I'm using spawnOn in my startupHook to open various programs on various
virtual desktops when logging in - it's quite nice to have that happen
automatically.

I start two instances of the Nautilus (file manager) fork Nemo:

  spawnOn "7" "nemo ~/video/"
  spawnOn "7" "nemo ~/video/tablet/"

But only one of them ends up on desktop 7. The one other is placed on
the current desktop.

I have tried adding a "sleep 2;" to one of them, to see if it was some
timing thing, but the same thing happens.

I have also tried to combine them, and have one line starting "nemo
~/video/" nemo ~/video/tablet/", same thing.

Oh, and as I am typing this, I realize that the second invocation
probably doesn't start a lasting separate process, but messages the
first to open a new window, and that original process then opens it,
might be why spawnOn seems to "not work".

Maybe I should just use manageSpawn to have all Nemo windows end up on
desktop 7.

I guess I have rubber ducked myself into the answer, but any comments
are welcome regardless.

  Best wishes,

    Adam

--
"Please don't "meh" the panopticon. You are                  Adam Sjøgren
 not making things better by doing that."                asjo@koldfront.dk

_______________________________________________
xmonad mailing list
xmonad@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad


--
brandon s allbery kf8nh
allbery.b@gmail.com