From d81c930991f6229fba9c6ae015b68d411ce594af Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Mon, 4 Feb 2008 20:24:45 +0100 Subject: Add a startupHook. The only thing I am not sure about here is at what exact point the startupHook should get run. I picked a place that seems to make sense: as late as possible, right before entering the main loop. That way all the layouts/workspaces/other state are set up and the startupHook can manipulate them. darcs-hash:20080204192445-bd4d7-218d69dcf3cd5c5f2962859cf847595527399807 --- man/xmonad.hs | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'man') diff --git a/man/xmonad.hs b/man/xmonad.hs index e283afb..5858e36 100644 --- a/man/xmonad.hs +++ b/man/xmonad.hs @@ -247,6 +247,16 @@ myFocusFollowsMouse = True -- myLogHook = return () +------------------------------------------------------------------------ +-- Startup hook + +-- Perform an arbitrary action each time xmonad starts or is restarted +-- with mod-q. Used by, e.g., XMonad.Layout.PerWorkspace to initialize +-- per-workspace layout choices. +-- +-- By default, do nothing. +myStartupHook = return () + ------------------------------------------------------------------------ -- Now run xmonad with all the defaults we set up. @@ -279,5 +289,6 @@ defaults = defaultConfig { -- hooks, layouts layoutHook = myLayout, manageHook = myManageHook, - logHook = myLogHook + logHook = myLogHook, + startupHook = myStartupHook } -- cgit v1.2.3