aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLukas Mai <l.mai@web.de>2008-03-21 23:13:15 +0100
committerLukas Mai <l.mai@web.de>2008-03-21 23:13:15 +0100
commitea5a3128b08e889512b09ef735ddb573317b7ef3 (patch)
tree5ad1561eac9f5e40bfe214a0417cec8552359c84
parentaf88859f7275000a3bc09f0c4b4878fe5e35e1be (diff)
downloadXMonadContrib-ea5a3128b08e889512b09ef735ddb573317b7ef3.tar.gz
XMonadContrib-ea5a3128b08e889512b09ef735ddb573317b7ef3.tar.xz
XMonadContrib-ea5a3128b08e889512b09ef735ddb573317b7ef3.zip
XMonad.Layout.NoBorders: first attempt at documenting smartBorders
darcs-hash:20080321221315-462cf-23d1355c7f0a57d49f9b12e27d87c4b3d9299b3c.gz
-rw-r--r--XMonad/Layout/NoBorders.hs12
1 files changed, 8 insertions, 4 deletions
diff --git a/XMonad/Layout/NoBorders.hs b/XMonad/Layout/NoBorders.hs
index 783d814..ec7de5c 100644
--- a/XMonad/Layout/NoBorders.hs
+++ b/XMonad/Layout/NoBorders.hs
@@ -58,9 +58,12 @@ instance LayoutModifier WithBorder Window where
where
ws = map fst wrs
+-- | Removes all window borders from the specified layout.
noBorders :: LayoutClass l Window => l Window -> ModifiedLayout WithBorder l Window
-noBorders = ModifiedLayout $ WithBorder 0 []
+noBorders = withBorder 0
+-- | Forces a layout to use the specified border width. 'noBorders' is
+-- equivalent to @'withBorder' 0@.
withBorder :: LayoutClass l a => Dimension -> l a -> ModifiedLayout WithBorder l a
withBorder b = ModifiedLayout $ WithBorder b []
@@ -94,11 +97,12 @@ instance LayoutModifier SmartBorder Window where
nonzerorect (Rectangle _ _ 0 0) = False
nonzerorect _ = True
+-- | Removes the borders from a window under one of the following conditions:
--
--- | You can cleverly set no borders on a range of layouts, using a
--- layoutHook like so:
+-- * There is only one screen and only one window. In this case it's obvious
+-- that it has the focus, so no border is needed.
--
--- > layoutHook = smartBorders $ tiled ||| Mirror tiled ||| ...
+-- * A floating window covers the entire screen (e.g. mplayer).
--
smartBorders :: LayoutClass l a => l a -> ModifiedLayout SmartBorder l a
smartBorders = ModifiedLayout (SmartBorder [])