diff options
author | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 08:23:08 +0100 |
---|---|---|
committer | Spencer Janssen <sjanssen@cse.unl.edu> | 2007-11-01 08:23:08 +0100 |
commit | bd6e06d56c5a0d6ed50422e7ecf9fef809c8db11 (patch) | |
tree | 76dcbdaf5392f74926cc85e21f0971b8a4e94020 /XMonad.hs | |
parent | cad84bdf1518c173d76fd0de04ace22eb886821a (diff) | |
download | xmonad-bd6e06d56c5a0d6ed50422e7ecf9fef809c8db11.tar.gz xmonad-bd6e06d56c5a0d6ed50422e7ecf9fef809c8db11.tar.xz xmonad-bd6e06d56c5a0d6ed50422e7ecf9fef809c8db11.zip |
Store user configuration in XConf
darcs-hash:20071101072308-a5988-e5a5231e3adcff8f03ebdab37721b19c0e19fc00.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad.hs | 20 |
1 files changed, 17 insertions, 3 deletions
@@ -16,7 +16,7 @@ ----------------------------------------------------------------------------- module XMonad ( - X, WindowSet, WindowSpace, WorkspaceId, ScreenId(..), ScreenDetail(..), XState(..), XConf(..), LayoutClass(..), Layout(..), + X, WindowSet, WindowSpace, WorkspaceId, ScreenId(..), ScreenDetail(..), XState(..), XConf(..), XConfig(..), LayoutClass(..), Layout(..), Typeable, Message, SomeMessage(..), fromMessage, runLayout, LayoutMessages(..), runX, catchX, userCode, io, catchIO, withDisplay, withWindowSet, isRoot, getAtom, spawn, restart, trace, whenJust, whenX, atom_WM_STATE, atom_WM_PROTOCOLS, atom_WM_DELETE_WINDOW @@ -46,15 +46,29 @@ data XState = XState , mapped :: !(S.Set Window) -- ^ the Set of mapped windows , waitingUnmap :: !(M.Map Window Int) -- ^ the number of expected UnmapEvents , dragging :: !(Maybe (Position -> Position -> X (), X ())) } + data XConf = XConf { display :: Display -- ^ the X11 display - , logHook :: !(X ()) -- ^ the loghook function + , config :: !XConfig -- ^ initial user configuration , terminal :: !String -- ^ the user's preferred terminal , theRoot :: !Window -- ^ the root window - , borderWidth :: !Dimension -- ^ the preferred border width , normalBorder :: !Pixel -- ^ border color of unfocused windows , focusedBorder :: !Pixel } -- ^ border color of the focused window +-- todo, better name +data XConfig = forall l. (LayoutClass l Window, Read (l Window)) => + XConfig { normalBorderColor :: !String + , focusedBorderColor :: !String + , defaultTerminal :: !String + , layoutHook :: !(l Window) + , workspaces :: ![String] + , defaultGaps :: ![(Int,Int,Int,Int)] + , keys :: !(M.Map (ButtonMask,KeySym) (X ())) + , mouseBindings :: !(M.Map (ButtonMask, Button) (Window -> X ())) + , borderWidth :: !Dimension + , logHook :: !(X ()) + } + type WindowSet = StackSet WorkspaceId (Layout Window) Window ScreenId ScreenDetail type WindowSpace = Workspace WorkspaceId (Layout Window) Window |