[xmonad] spawnOn in startupHook only works for one Nemo window, not the other

Brandon Allbery allbery.b at gmail.com
Sat Nov 2 10:30:47 UTC 2019


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 at 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 at koldfront.dk
>
> _______________________________________________
> xmonad mailing list
> xmonad at haskell.org
> http://mail.haskell.org/cgi-bin/mailman/listinfo/xmonad
>


-- 
brandon s allbery kf8nh
allbery.b at gmail.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20191102/d0882f5c/attachment.html>


More information about the xmonad mailing list