<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 31, 2015 at 11:35 AM, Adam Sjøgren <span dir="ltr"><<a href="mailto:asjo@koldfront.dk" target="_blank">asjo@koldfront.dk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div id=":1aj" class="" style="overflow:hidden">I have a startupHook that spawns a number of windows on various<br>
workspaces.<br>
<br>
When I restart XMonad, I don't want those windows opened again.<br>
<br></div></blockquote></div><br>Use XMonad.Util.SpawnOnce.spawnOnce. If you want to use SpawnOn as well then you'd need to write your own spawner combining the two.</div><div class="gmail_extra"><br></div><div class="gmail_extra">The more general way to do it is:</div><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_extra"><font face="monospace, monospace">    as <- io getArgs</font></div><div class="gmail_extra"><font face="monospace, monospace">    when (null as) $ do</font></div><div class="gmail_extra"><font face="monospace, monospace">      {- your startup code here -}</font></div><div><br></div><div>which takes advantage of the fact that restarts pass <font face="monospace, monospace">--resume</font> as a parameter, followed by the serialized xmonad state.</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div><div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div></div>
</div></div>