aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Hooks
diff options
context:
space:
mode:
Diffstat (limited to 'XMonad/Hooks')
-rw-r--r--XMonad/Hooks/ManageDocks.hs15
1 files changed, 14 insertions, 1 deletions
diff --git a/XMonad/Hooks/ManageDocks.hs b/XMonad/Hooks/ManageDocks.hs
index 481c047..09e52e2 100644
--- a/XMonad/Hooks/ManageDocks.hs
+++ b/XMonad/Hooks/ManageDocks.hs
@@ -16,6 +16,19 @@
-- It also allows you to reset the gap to reflect the state of current STRUT
-- windows (for example, after you resized or closed a panel), and to toggle the Gap
-- in a STRUT-aware fashion.
+
+-- The avoidStruts layout modifier allows you to make xmonad dynamically
+-- avoid overlapping windows with panels. You can (optionally) enable this
+-- on a selective basis, so that some layouts will effectively hide the
+-- panel, by placing windows on top of it. An example use of avoidStruts
+-- would be:
+
+-- > layoutHook = Layout $ toggleLayouts (noBorders Full) $ avoidStruts $
+-- > your actual layouts here ||| ...
+
+-- This would enable a full-screen mode that overlaps the panel, while all
+-- other layouts avoid the panel.
+
-----------------------------------------------------------------------------
module XMonad.Hooks.ManageDocks (
-- * Usage
@@ -144,7 +157,7 @@ data AvoidStruts l a = AvoidStruts (l a) deriving ( Read, Show )
instance LayoutClass l a => LayoutClass (AvoidStruts l) a where
doLayout (AvoidStruts lo) (Rectangle x y w h) s =
do (t,l,b,r) <- calcGap
- let rect = Rectangle (x+10+fromIntegral l) (y+fromIntegral t)
+ let rect = Rectangle (x+fromIntegral l) (y+fromIntegral t)
(w-fromIntegral l-fromIntegral r) (h-fromIntegral t-fromIntegral b)
(wrs,mlo') <- doLayout lo rect s
return (wrs, AvoidStruts `fmap` mlo')