diff options
author | Don Stewart <dons@cse.unsw.edu.au> | 2007-05-27 14:27:02 +0200 |
---|---|---|
committer | Don Stewart <dons@cse.unsw.edu.au> | 2007-05-27 14:27:02 +0200 |
commit | fb64aaf78368b7edf3affcb6e1fe4c48327f62d0 (patch) | |
tree | de7b8f261a2cc75fff94fa1435a61bc517a73a40 /Operations.hs | |
parent | c2926cad4f987d731a4043ee10f41bfa21404777 (diff) | |
download | metatile-fb64aaf78368b7edf3affcb6e1fe4c48327f62d0.tar metatile-fb64aaf78368b7edf3affcb6e1fe4c48327f62d0.zip |
Add new config value, defaultMenuGap, for specifying a gap for a status bar
By default, it is 0 (set in Config.hs), but set this to a pixel count to
get a permanent gap at the top of the screen. You can then at startup
launch dzen, and it will run in this gap, and not be obscured by other
windows.
Perfect for a persistant status bar.
darcs-hash:20070527122702-9c5c1-2a3ca82463b3bab21556674936b1bf8a86ba6356
Diffstat (limited to 'Operations.hs')
-rw-r--r-- | Operations.hs | 6 |
1 files changed, 4 insertions, 2 deletions
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. |