[xmonad] myStartupHook Examples?

lithis xmonad at selg.hethrael.org
Tue May 20 22:28:56 EDT 2008


On Tue, 2008/05/20 19:16:51 -0700, Don Stewart wrote:
> myStartupHook normally is for running actions that need access to the 
> internal state of xmonad.
> 
> If you just want to launch programs, that's as easy as:
> 
>     main = do
>         spawn "xclock"
>         ...
>         ...
> 
> in your xmonad.hs

However, both the startupHook and Don’s suggestion above
will relaunch every time you restart xmonad (eg. press
Mod+Q). While this is not a problem for xsetroot, the best
place to launch processes is in your .xsession or .xinitrc.
It might be possible to check whether xmonad is resuming
after a Mod+Q and only run programs if it isn’t, but I don’t
know how.


More information about the xmonad mailing list