summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Config.hs4
-rw-r--r--Config.hs-boot1
-rw-r--r--Operations.hs6
3 files changed, 9 insertions, 2 deletions
diff --git a/Config.hs b/Config.hs
index 0ef088d..617f982 100644
--- a/Config.hs
+++ b/Config.hs
@@ -49,6 +49,10 @@ defaultDelta = 3%100
defaultWindowsInMaster :: Int
defaultWindowsInMaster = 1
+-- Default width of gap at top of screen for a menu bar (e.g. 16)
+defaultMenuGap :: Int
+defaultMenuGap = 0
+
-- numlock handling:
--
-- The mask for the numlock key. You may need to change this on some systems.
diff --git a/Config.hs-boot b/Config.hs-boot
index 2d66ae1..fe30869 100644
--- a/Config.hs-boot
+++ b/Config.hs-boot
@@ -1,3 +1,4 @@
module Config where
import Graphics.X11.Xlib.Types (Dimension)
borderWidth :: Dimension
+defaultMenuGap :: Int
diff --git a/Operations.hs b/Operations.hs
index ab6490d..96727bb 100644
--- a/Operations.hs
+++ b/Operations.hs
@@ -15,7 +15,7 @@ module Operations where
import XMonad
import qualified StackSet as W
-import {-# SOURCE #-} Config (borderWidth)
+import {-# SOURCE #-} Config (borderWidth,defaultMenuGap)
import Data.Maybe
import Data.List (genericIndex, intersectBy)
@@ -131,8 +131,10 @@ refresh = do
let n = W.tag (W.workspace w)
this = W.view n ws
Just l = fmap fst $ M.lookup n fls
+ Rectangle sx sy sw sh = genericIndex xinesc (W.screen w)
-- now tile the windows on this workspace
- rs <- doLayout l (genericIndex xinesc (W.screen w)) (W.index this)
+ rs <- doLayout l (Rectangle sx (sy + fromIntegral defaultMenuGap)
+ sw (sh - fromIntegral defaultMenuGap)) (W.index this)
mapM_ (\(win,rect) -> io (tileWindow d win rect)) rs
-- and raise the focused window if there is one.