aboutsummaryrefslogtreecommitdiffstats
path: root/Config.hs
diff options
context:
space:
mode:
authorDon Stewart <dons@cse.unsw.edu.au>2007-05-28 05:15:01 +0200
committerDon Stewart <dons@cse.unsw.edu.au>2007-05-28 05:15:01 +0200
commitcd63c493c4af7543af97ff5cd0da8b7128351994 (patch)
tree32f29df936cef95ab57b01f4a72c4310d759ed23 /Config.hs
parentbc4224c22b9e655bde2eda9bf9374c5bff5d14c1 (diff)
downloadxmonad-cd63c493c4af7543af97ff5cd0da8b7128351994.tar.gz
xmonad-cd63c493c4af7543af97ff5cd0da8b7128351994.tar.xz
xmonad-cd63c493c4af7543af97ff5cd0da8b7128351994.zip
support per-screen gap settings. you can have different gaps on individual screens now
darcs-hash:20070528031501-9c5c1-beaadbacb5efc1ce5998aba41fbb3b2c68cdf0d1.gz
Diffstat (limited to 'Config.hs')
-rw-r--r--Config.hs11
1 files changed, 6 insertions, 5 deletions
diff --git a/Config.hs b/Config.hs
index 8d0f4f7..45a8f9e 100644
--- a/Config.hs
+++ b/Config.hs
@@ -49,14 +49,14 @@ defaultDelta = 3%100
defaultWindowsInMaster :: Int
defaultWindowsInMaster = 1
--- Default offset of drawable screen boundary from physical screen.
+-- Default offset of drawable screen boundaries from each physical screen.
-- Anything non-zero here will leave a gap of that many pixels on the
--- given edge. A useful gap at top of screen for a menu bar (e.g. 15)
+-- given edge, on the that screen. A useful gap at top of screen for a menu bar (e.g. 15)
--
-- Fields are: top, bottom, left, right.
--
-defaultGap :: (Int,Int,Int,Int)
-defaultGap = (0,0,0,0) -- 15 for default dzen
+defaultGaps :: [(Int,Int,Int,Int)]
+defaultGaps = [(0,0,0,0)] -- 15 for default dzen
-- numlock handling:
--
@@ -120,7 +120,8 @@ keys = M.fromList $
, ((modMask , xK_period), sendMessage (IncMasterN (-1))) -- @@ Deincrement the number of windows in the master area
-- toggle the status bar gap
- , ((modMask , xK_b ), modifyGap (\n -> if n == defaultGap then (0,0,0,0) else defaultGap)) -- @@ Toggle the status bar gap
+ , ((modMask , xK_b ),
+ modifyGap (\i n -> let x = defaultGaps !! i in if n == x then (0,0,0,0) else x)) -- @@ Toggle the status bar gap
-- quit, or restart
, ((modMask .|. shiftMask, xK_q ), io (exitWith ExitSuccess)) -- @@ Quit xmonad