aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout/HintedTile.hs
diff options
context:
space:
mode:
authorlithis <xmonad@selg.hethrael.org>2008-05-08 02:02:45 +0200
committerlithis <xmonad@selg.hethrael.org>2008-05-08 02:02:45 +0200
commit5ec0641c2201f9feb48e5c5992cf1063633f80dc (patch)
tree57d2417aebceb2c9ebd747a0a6a8715468f222f6 /XMonad/Layout/HintedTile.hs
parent616de114c5e393da390c0bebd70d9f4fa5df75e7 (diff)
downloadXMonadContrib-5ec0641c2201f9feb48e5c5992cf1063633f80dc.tar.gz
XMonadContrib-5ec0641c2201f9feb48e5c5992cf1063633f80dc.tar.xz
XMonadContrib-5ec0641c2201f9feb48e5c5992cf1063633f80dc.zip
HintedTile: Improve documentation.
darcs-hash:20080508000245-1c3cf-d5cfb70a98652abe76fc3d3144b6c414892bdb42.gz
Diffstat (limited to 'XMonad/Layout/HintedTile.hs')
-rw-r--r--XMonad/Layout/HintedTile.hs21
1 files changed, 17 insertions, 4 deletions
diff --git a/XMonad/Layout/HintedTile.hs b/XMonad/Layout/HintedTile.hs
index 4266cfc..d6bd51e 100644
--- a/XMonad/Layout/HintedTile.hs
+++ b/XMonad/Layout/HintedTile.hs
@@ -32,8 +32,18 @@ import Control.Monad
--
-- Then edit your @layoutHook@ by adding the HintedTile layout:
--
--- > myLayouts = HintedTile 1 0.1 0.5 TopLeft Tall ||| Full ||| etc..
--- > main = xmonad defaultConfig { layoutHook = myLayouts }
+-- > myLayout = hintedTile Tall ||| hintedTile Wide ||| Full ||| etc..
+-- > where
+-- > tiled = HintedTile nmaster delta ratio TopLeft
+-- > nmaster = 1
+-- > ratio = 1/2
+-- > delta = 3/100
+-- > main = xmonad defaultConfig { layoutHook = myLayout }
+--
+-- Because both Xmonad and Xmonad.Layout.HintedTile define Tall,
+-- you need to disambiguate Tall. If you are replacing the
+-- built-in Tall with HintedTile, change @import Xmonad@ to
+-- @import Xmonad hiding (Tall)@.
--
-- For more detailed instructions on editing the layoutHook see:
--
@@ -42,11 +52,14 @@ import Control.Monad
data HintedTile a = HintedTile
{ nmaster :: !Int
, delta, frac :: !Rational
- , alignment :: !Alignment
+ , alignment :: !Alignment -- ^ Where to place windows that are smaller
+ -- than their preordained rectangles.
, orientation :: !Orientation
} deriving ( Show, Read )
-data Orientation = Wide | Tall
+data Orientation
+ = Wide -- ^ Lay out windows similarly to Mirror tiled.
+ | Tall -- ^ Lay out windows similarly to tiled.
deriving ( Show, Read, Eq, Ord )
data Alignment = TopLeft | Center | BottomRight