summaryrefslogtreecommitdiffstats
path: root/XMonad.hs
diff options
context:
space:
mode:
authorSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 08:23:08 +0100
committerSpencer Janssen <sjanssen@cse.unl.edu>2007-11-01 08:23:08 +0100
commitb7e7fa2399db8c05fdcf0edf9189dfefaa904cef (patch)
tree76dcbdaf5392f74926cc85e21f0971b8a4e94020 /XMonad.hs
parentc1dab22936b718b48f98b39befc6af6ce416fbf6 (diff)
downloadmetatile-b7e7fa2399db8c05fdcf0edf9189dfefaa904cef.tar
metatile-b7e7fa2399db8c05fdcf0edf9189dfefaa904cef.zip
Store user configuration in XConf
darcs-hash:20071101072308-a5988-e5a5231e3adcff8f03ebdab37721b19c0e19fc00
Diffstat (limited to 'XMonad.hs')
-rw-r--r--XMonad.hs20
1 files changed, 17 insertions, 3 deletions
diff --git a/XMonad.hs b/XMonad.hs
index 59f81ff..b30b5a9 100644
--- a/XMonad.hs
+++ b/XMonad.hs
@@ -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