diff options
author | Brent Yorgey <byorgey@gmail.com> | 2007-11-23 19:45:01 +0100 |
---|---|---|
committer | Brent Yorgey <byorgey@gmail.com> | 2007-11-23 19:45:01 +0100 |
commit | aff9b9e8528c2f7a7225532ac6b1e8282aaf6345 (patch) | |
tree | c16a0d381dc301668823c66b9445ab91d8407de3 /XMonad/Doc | |
parent | f0bce453588aeef69e86961211922cbdde518181 (diff) | |
download | XMonadContrib-aff9b9e8528c2f7a7225532ac6b1e8282aaf6345.tar.gz XMonadContrib-aff9b9e8528c2f7a7225532ac6b1e8282aaf6345.tar.xz XMonadContrib-aff9b9e8528c2f7a7225532ac6b1e8282aaf6345.zip |
Doc/Extending.hs: add a section about configuring mouse bindings.
darcs-hash:20071123184501-bd4d7-013cff77a2873cd67939d402d3be05c63ef487f4.gz
Diffstat (limited to 'XMonad/Doc')
-rw-r--r-- | XMonad/Doc/Extending.hs | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/XMonad/Doc/Extending.hs b/XMonad/Doc/Extending.hs index 3b18c5b..aa501dc 100644 --- a/XMonad/Doc/Extending.hs +++ b/XMonad/Doc/Extending.hs @@ -68,6 +68,9 @@ module XMonad.Doc.Extending -- *** Adding and removing key bindings -- $keyAddDel + -- ** Editing mouse bindings + -- $mouse + -- ** Editing the layout hook -- $layoutHook @@ -580,6 +583,29 @@ function in particular. -} +{- $mouse +#Editing_mouse_bindings# + +Most of the previous discussion of key bindings applies to mouse +bindings as well. For example, you could configure button4 to close +the window you click on like so: + +> import qualified Data.Map as M +> +> myMouse x = [ (0, button4), (\w -> focus w >> kill) ] +> +> newMouse x = M.union (mouseBindings defaultConfig x) (M.fromList (myMouse x)) +> +> main = xmonad $ defaultConfig { ..., mouseBindings = newMouse, ... } + +Overriding or deleting mouse bindings works similarly. You can also +configure mouse bindings much more easily using the +'XMonad.Util.EZConfig.additionalMouseBindings' and +'XMonad.Util.EZConfig.removeMouseBindings' functions from the +"XMonad.Util.EZConfig" module. + +-} + {- $layoutHook #Editing_the_layout_hook# |