
XMonad Fans, Could someone point me towards examples of running things like xsetroot, etc., from a myStartupHook? I found a sample xmonad.hs config file and have tweaked a couple of settings. The example contains a myStartupHook, which does nothing: -- By default, do nothing. myStartupHook = return () Being new to both Haskell and XMonad I'm not sure where to go from there. I tried searching the net bit haven't found an example yet. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et efficax per exempla!!!

Kevin:
XMonad Fans,
Could someone point me towards examples of running things like xsetroot, etc., from a myStartupHook? I found a sample xmonad.hs config file and have tweaked a couple of settings. The example contains a myStartupHook, which does nothing:
-- By default, do nothing. myStartupHook = return ()
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 -- Don

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.
participants (3)
-
Don Stewart
-
Kevin Monceaux
-
lithis