From 06e9858d09160d03a2c57b0752ff47ade8561c2b Mon Sep 17 00:00:00 2001 From: Spencer Janssen Date: Fri, 2 Nov 2007 03:59:24 +0100 Subject: Float handler out of makeMain, make keys and mouseBindings dependent on XConfig for easy modMask switching darcs-hash:20071102025924-a5988-bbddb07ed8c00cb4279db059f2513eba4ce3ecb5.gz --- XMonad.hs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to 'XMonad.hs') diff --git a/XMonad.hs b/XMonad.hs index 9039de2..c3733be 100644 --- a/XMonad.hs +++ b/XMonad.hs @@ -51,7 +51,12 @@ data XConf = XConf , config :: !XConfig -- ^ initial user configuration , theRoot :: !Window -- ^ the root window , normalBorder :: !Pixel -- ^ border color of unfocused windows - , focusedBorder :: !Pixel } -- ^ border color of the focused window + , focusedBorder :: !Pixel -- ^ border color of the focused window + , keyActions :: !(M.Map (KeyMask, KeySym) (X ())) + -- ^ a mapping of key presses to actions + , buttonActions :: !(M.Map (KeyMask, Button) (Window -> X ())) + -- ^ a mapping of button presses to actions + } -- todo, better name data XConfig = XConfig { normalBorderColor :: !String @@ -61,9 +66,10 @@ data XConfig = XConfig { normalBorderColor :: !String , manageHook :: !(Window -> String -> String -> String -> X (WindowSet -> WindowSet)) , workspaces :: ![String] , defaultGaps :: ![(Int,Int,Int,Int)] - , numlockMask :: KeyMask - , keys :: !(M.Map (ButtonMask,KeySym) (X ())) - , mouseBindings :: !(M.Map (ButtonMask, Button) (Window -> X ())) + , numlockMask :: !KeyMask + , modMask :: !KeyMask + , keys :: !(XConfig -> M.Map (ButtonMask,KeySym) (X ())) + , mouseBindings :: !(XConfig -> M.Map (ButtonMask, Button) (Window -> X ())) , borderWidth :: !Dimension , logHook :: !(X ()) } -- cgit v1.2.3