diff options
author | Don Stewart <dons@galois.com> | 2007-10-13 22:43:00 +0200 |
---|---|---|
committer | Don Stewart <dons@galois.com> | 2007-10-13 22:43:00 +0200 |
commit | bc62d80641a5948f41fdfb7d50d8abaae4e0f381 (patch) | |
tree | c4e7fd7cc287f672f0653c3c601922769bd8d208 /Config.hs | |
parent | 9210b48e15a40b99f6755da7efc5019719233ebf (diff) | |
download | xmonad-bc62d80641a5948f41fdfb7d50d8abaae4e0f381.tar.gz xmonad-bc62d80641a5948f41fdfb7d50d8abaae4e0f381.tar.xz xmonad-bc62d80641a5948f41fdfb7d50d8abaae4e0f381.zip |
clean up names of layout code
darcs-hash:20071013204300-cba2c-7f8fb3244bbd918cd28679debad2129db542d7e8.gz
Diffstat (limited to '')
-rw-r--r-- | Config.hs | 48 | ||||
-rw-r--r-- | Config.hs-boot | 4 |
2 files changed, 28 insertions, 24 deletions
@@ -115,22 +115,13 @@ focusedBorderColor = "#ff0000" borderWidth :: Dimension borderWidth = 1 --- | --- The default Layout, a selector between the layouts listed below in --- defaultLayouts. --- -defaultLayout :: Layout Window -defaultLayout = Layout $ LayoutSelection defaultLayouts - --- | --- The list of selectable layouts -defaultLayouts :: [Layout Window] -defaultLayouts = [ Layout tiled - , Layout $ Mirror tiled - , Layout Full - - -- Extension-provided layouts - ] +-- | The list of possible layouts. Add your custom layouts to this list. +layouts :: [Layout Window] +layouts = [ Layout tiled + , Layout $ Mirror tiled + , Layout Full + -- Add extra layouts you want to use here: + ] where -- default tiling algorithm partitions the screen into two panes tiled = Tall nmaster delta ratio @@ -145,11 +136,24 @@ defaultLayouts = [ Layout tiled delta = 3%100 -- | --- A list of layouts which xmonad can deserialize. -possibleLayouts :: [Layout Window] -possibleLayouts = [defaultLayout - -- Extension-provided layouts - ] ++ defaultLayouts +-- The top level layout switcher. By default, we simply switch between +-- the layouts listed in `layouts', but you may program your own selection +-- behaviour here. Layout transformers would be hooked in here. +-- +layoutHook :: Layout Window +layoutHook = Layout $ Select layouts + +-- | +-- The default Layout, a selector between the layouts listed below in +-- defaultLayouts. +-- +-- defaultLayout :: Layout Window +-- defaultLayout = Layout $ LayoutSelection defaultLayouts + +-- | Register with xmonad a list of layouts whose state we can preserve over restarts. +-- There is typically no need to modify this list, the defaults are fine. +serialisedLayouts :: [Layout Window] +serialisedLayouts = layoutHook : layouts -- | -- Perform an arbitrary action on each state change. @@ -175,7 +179,7 @@ keys = M.fromList $ , ((modMask .|. shiftMask, xK_c ), kill) -- %! Close the focused window , ((modMask, xK_space ), sendMessage NextLayout) -- %! Rotate through the available layout algorithms - , ((modMask .|. shiftMask, xK_space ), setLayout defaultLayout) -- %! Reset the layouts on the current workspace to default + , ((modMask .|. shiftMask, xK_space ), setLayout layoutHook) -- %! Reset the layouts on the current workspace to default , ((modMask, xK_n ), refresh) -- %! Resize viewed windows to the correct size diff --git a/Config.hs-boot b/Config.hs-boot index b6151c8..6d631c5 100644 --- a/Config.hs-boot +++ b/Config.hs-boot @@ -3,8 +3,8 @@ import Graphics.X11.Xlib.Types (Dimension) import Graphics.X11.Xlib (KeyMask,Window) import XMonad borderWidth :: Dimension -logHook :: X () numlockMask :: KeyMask workspaces :: [WorkspaceId] -possibleLayouts :: [Layout Window] +logHook :: X () manageHook :: Window -> String -> String -> String -> X (WindowSet -> WindowSet) +serialisedLayouts :: [Layout Window] |