aboutsummaryrefslogtreecommitdiffstats
path: root/man
diff options
context:
space:
mode:
authorBrent Yorgey <byorgey@gmail.com>2008-02-04 20:24:45 +0100
committerBrent Yorgey <byorgey@gmail.com>2008-02-04 20:24:45 +0100
commit59b7d6df4ecc006ffb19fe4dd6eb7523875617ce (patch)
treefc7aa74ccbcb47b52a2811da0ef88235637cae2b /man
parentbf1034609caf8b353fe0d05a3773e24de0cb33ec (diff)
downloadxmonad-59b7d6df4ecc006ffb19fe4dd6eb7523875617ce.tar.gz
xmonad-59b7d6df4ecc006ffb19fe4dd6eb7523875617ce.tar.xz
xmonad-59b7d6df4ecc006ffb19fe4dd6eb7523875617ce.zip
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.gz
Diffstat (limited to 'man')
-rw-r--r--man/xmonad.hs13
1 files changed, 12 insertions, 1 deletions
diff --git a/man/xmonad.hs b/man/xmonad.hs
index e283afb..5858e36 100644
--- a/man/xmonad.hs
+++ b/man/xmonad.hs
@@ -248,6 +248,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.
-- Run xmonad with the settings you specify. No need to modify this.
@@ -279,5 +289,6 @@ defaults = defaultConfig {
-- hooks, layouts
layoutHook = myLayout,
manageHook = myManageHook,
- logHook = myLogHook
+ logHook = myLogHook,
+ startupHook = myStartupHook
}