aboutsummaryrefslogtreecommitdiffstats
path: root/XMonad/Layout
diff options
context:
space:
mode:
authorAndrea Rossato <andrea.rossato@unibz.it>2007-11-23 14:50:23 +0100
committerAndrea Rossato <andrea.rossato@unibz.it>2007-11-23 14:50:23 +0100
commit18d33e8280e5dc4c36be328b48b7d5e337804edb (patch)
treecaf1c47094bca828257e3f73a7ad281747d02851 /XMonad/Layout
parentad9b6fd1452c18a22438ba9d88128278c79250ba (diff)
downloadXMonadContrib-18d33e8280e5dc4c36be328b48b7d5e337804edb.tar.gz
XMonadContrib-18d33e8280e5dc4c36be328b48b7d5e337804edb.tar.xz
XMonadContrib-18d33e8280e5dc4c36be328b48b7d5e337804edb.zip
Spiral: haddock docs
darcs-hash:20071123135023-32816-d2a97f42229174df9cb54d1ebfbede71e0bc0ff8.gz
Diffstat (limited to 'XMonad/Layout')
-rw-r--r--XMonad/Layout/Spiral.hs21
1 files changed, 13 insertions, 8 deletions
diff --git a/XMonad/Layout/Spiral.hs b/XMonad/Layout/Spiral.hs
index b865f4d..6900af4 100644
--- a/XMonad/Layout/Spiral.hs
+++ b/XMonad/Layout/Spiral.hs
@@ -5,7 +5,7 @@
-- Module : XMonad.Layout.Spiral
-- Copyright : (c) Joe Thornber <joe.thornber@gmail.com>
-- License : BSD3-style (see LICENSE)
---
+--
-- Maintainer : Joe Thornber <joe.thornber@gmail.com>
-- Stability : stable
-- Portability : portable
@@ -30,14 +30,19 @@ import XMonad.Layouts
import XMonad.StackSet ( integrate )
-- $usage
--- You can use this module with the following in your Config.hs file:
+-- You can use this module with the following in your @~\/.xmonad\/xmonad.hs@:
--
--- > import XMonad.Layout.Spiral
+-- > import XMonad.Layout.Spiral
+-- > import Data.Ratio
--
--- > layouts = [ ..., Layout $ spiral (1 % 1), ... ]
-
--- %import XMonad.Layout.Spiral
--- %layout , Layout $ spiral (1 % 1)
+-- Then edit your @layoutHook@ by adding the Spiral layout:
+--
+-- > myLayouts = spiral (1 % 1) ||| etc..
+-- > main = xmonad dafaultConfig { layoutHook = myLayouts }
+--
+-- For more detailed instructions on editing the layoutHook see:
+--
+-- "XMonad.Doc.Extending#Editing_the_layout_hook"
fibs :: [Integer]
fibs = 1 : 1 : zipWith (+) fibs (tail fibs)
@@ -71,7 +76,7 @@ instance LayoutClass SpiralWithDir a where
ratios = blend scale . reverse . take (length ws - 1) . mkRatios $ tail fibs
rects = divideRects (zip ratios dirs) sc
dirs = dropWhile (/= dir) $ case rot of
- CW -> cycle [East .. North]
+ CW -> cycle [East .. North]
CCW -> cycle [North, West, South, East]
handleMessage (SpiralWithDir dir rot scale) = return . fmap resize . fromMessage
where resize Expand = spiralWithDir dir rot $ (21 % 20) * scale