diff options
author | Brent Yorgey <byorgey@gmail.com> | 2008-03-27 21:39:40 +0100 |
---|---|---|
committer | Brent Yorgey <byorgey@gmail.com> | 2008-03-27 21:39:40 +0100 |
commit | 161fc42347cafbc58f234e583477b31f0a3c6893 (patch) | |
tree | 32d0fb6cde14d23db5648c4523b65d1e3f5b3cee /XMonad | |
parent | 4a4a947c6b3e935a6ae898fd61f10a3dde40d285 (diff) | |
download | XMonadContrib-161fc42347cafbc58f234e583477b31f0a3c6893.tar.gz XMonadContrib-161fc42347cafbc58f234e583477b31f0a3c6893.tar.xz XMonadContrib-161fc42347cafbc58f234e583477b31f0a3c6893.zip |
ManageDocks: add avoidStrutsOn, for covering some docks and not others by default.
darcs-hash:20080327203940-bd4d7-7ae319d50280cb13d32d8186d7d8f4b2113c4919.gz
Diffstat (limited to '')
-rw-r--r-- | XMonad/Hooks/ManageDocks.hs | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/XMonad/Hooks/ManageDocks.hs b/XMonad/Hooks/ManageDocks.hs index 4f5554c..82178d5 100644 --- a/XMonad/Hooks/ManageDocks.hs +++ b/XMonad/Hooks/ManageDocks.hs @@ -17,7 +17,7 @@ module XMonad.Hooks.ManageDocks ( -- * Usage -- $usage - manageDocks, AvoidStruts, avoidStruts, ToggleStruts(..), + manageDocks, AvoidStruts, avoidStruts, avoidStrutsOn, ToggleStruts(..), Side(..) ) where @@ -60,6 +60,12 @@ import Data.List (delete) -- Similarly, you can use 'BB', 'LL', and 'RR' to individually toggle -- gaps on the bottom, left, or right. -- +-- If you want certain docks to be avoided but others to be covered by +-- default, you can manually specify the sides of the screen on which +-- docks should be avoided, using 'avoidStrutsOn'. For example: +-- +-- > layoutHook = avoidStrutsOn [TT,LL] (tall ||| mirror tall ||| ...) +-- -- /Important note/: if you are switching from manual gaps -- (defaultGaps in your config) to avoidStruts (recommended, since -- manual gaps will probably be phased out soon), be sure to switch @@ -133,7 +139,16 @@ calcGap ss = withDisplay $ \dpy -> do -- | Adjust layout automagically. avoidStruts :: LayoutClass l a => l a -> ModifiedLayout AvoidStruts l a -avoidStruts = ModifiedLayout (AvoidStruts [TT,BB,LL,RR]) +avoidStruts = avoidStrutsOn [TT,BB,LL,RR] + +-- | Adjust layout automagically: don't cover up docks, status bars, +-- etc. on the indicated sides of the screen. Valid sides are TT +-- (top), BB (bottom), RR (right), or LL (left). +avoidStrutsOn :: LayoutClass l a => + [Side] + -> l a + -> ModifiedLayout AvoidStruts l a +avoidStrutsOn ss = ModifiedLayout (AvoidStruts ss) data AvoidStruts a = AvoidStruts [Side] deriving ( Read, Show ) |