XMonad.Layout.NoBorders: first attempt at documenting smartBorders

This commit is contained in:
Lukas Mai
2008-03-21 22:13:15 +00:00
parent 7d0b8fd72f
commit a9a8e488ef

View File

@@ -58,9 +58,12 @@ instance LayoutModifier WithBorder Window where
where where
ws = map fst wrs ws = map fst wrs
-- | Removes all window borders from the specified layout.
noBorders :: LayoutClass l Window => l Window -> ModifiedLayout WithBorder l Window 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 :: LayoutClass l a => Dimension -> l a -> ModifiedLayout WithBorder l a
withBorder b = ModifiedLayout $ WithBorder b [] withBorder b = ModifiedLayout $ WithBorder b []
@@ -94,11 +97,12 @@ instance LayoutModifier SmartBorder Window where
nonzerorect (Rectangle _ _ 0 0) = False nonzerorect (Rectangle _ _ 0 0) = False
nonzerorect _ = True 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 -- * There is only one screen and only one window. In this case it's obvious
-- layoutHook like so: -- 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 :: LayoutClass l a => l a -> ModifiedLayout SmartBorder l a
smartBorders = ModifiedLayout (SmartBorder []) smartBorders = ModifiedLayout (SmartBorder [])