diff options
author | Brent Yorgey <byorgey@gmail.com> | 2008-03-28 20:22:31 +0100 |
---|---|---|
committer | Brent Yorgey <byorgey@gmail.com> | 2008-03-28 20:22:31 +0100 |
commit | 01fe604412ab3ecd9d2b8c47c356448799e3d8e5 (patch) | |
tree | c8b4ca7a05fe448a58ec49cdaf66f5d87ffa2d55 | |
parent | 4d96055b6b3dc29ccd2a7ad69cdb035accbb06b5 (diff) | |
download | XMonadContrib-01fe604412ab3ecd9d2b8c47c356448799e3d8e5.tar.gz XMonadContrib-01fe604412ab3ecd9d2b8c47c356448799e3d8e5.tar.xz XMonadContrib-01fe604412ab3ecd9d2b8c47c356448799e3d8e5.zip |
Spiral: add documentation
darcs-hash:20080328192231-bd4d7-22df21f89413618c2a2d5b1fcdff0baca232b6b0.gz
-rw-r--r-- | XMonad/Layout/Spiral.hs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/XMonad/Layout/Spiral.hs b/XMonad/Layout/Spiral.hs index 33ee764..09fe740 100644 --- a/XMonad/Layout/Spiral.hs +++ b/XMonad/Layout/Spiral.hs @@ -10,7 +10,7 @@ -- Stability : stable -- Portability : portable -- --- Spiral adds a spiral tiling layout +-- A spiral tiling layout. -- ----------------------------------------------------------------------------- @@ -31,11 +31,10 @@ import XMonad.StackSet ( integrate ) -- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@: -- -- > import XMonad.Layout.Spiral --- > import Data.Ratio -- -- Then edit your @layoutHook@ by adding the Spiral layout: -- --- > myLayouts = spiral (1 % 1) ||| etc.. +-- > myLayouts = spiral (6/7) ||| etc.. -- > main = xmonad defaultConfig { layoutHook = myLayouts } -- -- For more detailed instructions on editing the layoutHook see: @@ -59,9 +58,18 @@ blend scale ratios = zipWith (+) ratios scaleFactors step = (scale - (1 % 1)) / (fromIntegral len) scaleFactors = map (* step) . reverse . take len $ [0..] +-- | A spiral layout. The parameter controls the size ratio between +-- successive windows in the spiral. Sensible values range from 0 +-- up to the aspect ratio of your monitor (often 4/3). +-- +-- By default, the spiral is counterclockwise, starting to the east. +-- See also 'spiralWithDir'. spiral :: Rational -> SpiralWithDir a spiral = spiralWithDir East CW +-- | Create a spiral layout, specifying the starting cardinal direction, +-- the spiral direction (clockwise or counterclockwise), and the +-- size ratio. spiralWithDir :: Direction -> Rotation -> Rational -> SpiralWithDir a spiralWithDir = SpiralWithDir |