change workspaces to [WorkspaceId]

This commit is contained in:
David Roundy 2007-08-14 00:37:22 +00:00
parent 919774dff8
commit ec0995a3a6
3 changed files with 6 additions and 6 deletions

View File

@ -31,8 +31,8 @@ import Graphics.X11.Xlib
-- --
-- The number of workspaces (virtual screens, or window groups) -- The number of workspaces (virtual screens, or window groups)
-- --
workspaces :: Int workspaces :: [WorkspaceId]
workspaces = 9 workspaces = [0..8]
-- | -- |
-- modMask lets you specify which modkey you want to use. The default is -- modMask lets you specify which modkey you want to use. The default is
@ -157,7 +157,7 @@ keys = M.fromList $
-- mod-[1..9] @@ Switch to workspace N -- mod-[1..9] @@ Switch to workspace N
-- mod-shift-[1..9] @@ Move client to workspace N -- mod-shift-[1..9] @@ Move client to workspace N
[((m .|. modMask, k), f i) [((m .|. modMask, k), f i)
| (i, k) <- zip [0 .. fromIntegral workspaces - 1] [xK_1 ..] | (i, k) <- zip workspaces [xK_1 ..]
, (f, m) <- [(view, 0), (shift, shiftMask)]] , (f, m) <- [(view, 0), (shift, shiftMask)]]
-- mod-{w,e,r} @@ Switch to physical/Xinerama screens 1, 2, or 3 -- mod-{w,e,r} @@ Switch to physical/Xinerama screens 1, 2, or 3

View File

@ -5,4 +5,4 @@ import XMonad
borderWidth :: Dimension borderWidth :: Dimension
logHook :: X () logHook :: X ()
numlockMask :: KeyMask numlockMask :: KeyMask
workspaces :: Int workspaces :: [WorkspaceId]

View File

@ -52,7 +52,7 @@ main = do
let winset | ("--resume" : s : _) <- args let winset | ("--resume" : s : _) <- args
, [(x, "")] <- reads s = x , [(x, "")] <- reads s = x
| otherwise = new [0..fromIntegral workspaces-1] $ zipWith SD xinesc gaps | otherwise = new workspaces $ zipWith SD xinesc gaps
gaps = take (length xinesc) $ defaultGaps ++ repeat (0,0,0,0) gaps = take (length xinesc) $ defaultGaps ++ repeat (0,0,0,0)
safeLayouts = case defaultLayouts of [] -> (full, []); (x:xs) -> (x,xs) safeLayouts = case defaultLayouts of [] -> (full, []); (x:xs) -> (x,xs)
@ -63,7 +63,7 @@ main = do
, focusedBorder = fbc } , focusedBorder = fbc }
st = XState st = XState
{ windowset = winset { windowset = winset
, layouts = M.fromList [(w, safeLayouts) | w <- [0 .. W workspaces - 1]] , layouts = M.fromList [(w, safeLayouts) | w <- workspaces]
, mapped = S.empty , mapped = S.empty
, waitingUnmap = M.empty , waitingUnmap = M.empty
, dragging = Nothing } , dragging = Nothing }