[xmonad] Not running my startupHook on restart
Brandon Allbery
allbery.b at gmail.com
Thu Dec 31 16:42:34 UTC 2015
On Thu, Dec 31, 2015 at 11:35 AM, Adam Sjøgren <asjo at koldfront.dk> wrote:
> I have a startupHook that spawns a number of windows on various
> workspaces.
>
> When I restart XMonad, I don't want those windows opened again.
>
>
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.
The more general way to do it is:
as <- io getArgs
when (null as) $ do
{- your startup code here -}
which takes advantage of the fact that restarts pass --resume as a
parameter, followed by the serialized xmonad state.
--
brandon s allbery kf8nh sine nomine associates
allbery.b at gmail.com ballbery at sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad http://sinenomine.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/xmonad/attachments/20151231/e6a10a52/attachment.html>
More information about the xmonad
mailing list