Extending.hs: a few edits

This commit is contained in:
Brent Yorgey
2007-11-24 17:14:52 +00:00
parent 503400b6f8
commit a94c862a53

View File

@@ -785,19 +785,15 @@ all we need to do is change the 'XMonad.Core.manageHook' field of the
> main = xmonad defaultConfig { ..., manageHook = newManageHook, ... } > main = xmonad defaultConfig { ..., manageHook = newManageHook, ... }
And we are done. One more thing to note about this system is that if And we are done.
a window matches multiple rules in a 'XMonad.Config.manageHook', /all/
of the corresponding actions will be run (in the order in which they
are defined). This is a change from versions before 0.5, when only
the first rule that matched was run.
Obviously we may be willing to add more then one Obviously, we may wish to add more then one
'XMonad.Config.manageHook'. In this case we can use a list of hooks, 'XMonad.Config.manageHook'. In this case we can use a list of hooks,
compose them all with 'XMonad.ManageHook.composeAll', and add the compose them all with 'XMonad.ManageHook.composeAll', and add the
composed to the default one. composed to the default one.
For instance, if we want RealPlayer to float and thunderbird always For instance, if we want RealPlayer to float and thunderbird always
opened in the workspace named "mail" we can do like this: opened in the workspace named "mail", we can do so like this:
> myManageHook = composeAll [ resource =? "realplay.bin" --> doFloat > myManageHook = composeAll [ resource =? "realplay.bin" --> doFloat
> , resource =? "thunderbird-bin" --> doF (W.shift "mail") > , resource =? "thunderbird-bin" --> doF (W.shift "mail")
@@ -811,6 +807,12 @@ function, "XMonad.StackSet", like this:
And then we can add @myManageHook@ to the default one to create And then we can add @myManageHook@ to the default one to create
@newManageHook@ as we did in the previous example. @newManageHook@ as we did in the previous example.
One more thing to note about this system is that if
a window matches multiple rules in a 'XMonad.Config.manageHook', /all/
of the corresponding actions will be run (in the order in which they
are defined). This is a change from versions before 0.5, when only
the first rule that matched was run.
-} -}
{- $logHook {- $logHook