From 01fe604412ab3ecd9d2b8c47c356448799e3d8e5 Mon Sep 17 00:00:00 2001 From: Brent Yorgey Date: Fri, 28 Mar 2008 20:22:31 +0100 Subject: Spiral: add documentation darcs-hash:20080328192231-bd4d7-22df21f89413618c2a2d5b1fcdff0baca232b6b0.gz --- XMonad/Layout/Spiral.hs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'XMonad/Layout/Spiral.hs') 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 -- cgit v1.2.3