Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 420a649e6f65db30aa7451f64d08ff92 > files > 652

ghc-xmonad-contrib-devel-0.9.2-4.fc16.i686.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>XMonad.Layout.LayoutBuilder</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_XMonad-Layout-LayoutBuilder.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Layout-LayoutBuilder.html">Source</a></li><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">xmonad-contrib-0.9.2: Third party extensions for xmonad</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>unportable</td></tr><tr><th>Stability</th><td>unstable</td></tr><tr><th>Maintainer</th><td>Anders Engstrom &lt;ankaan@gmail.com&gt;</td></tr></table><p class="caption">XMonad.Layout.LayoutBuilder</p></div><div id="table-of-contents"><p class="caption">Contents</p><ul><li><a href="#g:1">Usage
</a></li></ul></div><div id="description"><p class="caption">Description</p><div class="doc"><p>A layout combinator that sends a specified number of windows to one rectangle
 and the rest to another.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><a href="#v:layoutN">layoutN</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> a, LayoutClass l1 a, LayoutClass l2 a, LayoutClass l3 a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a> -&gt; l1 a -&gt; LayoutN l2 l3 a -&gt; LayoutN l1 (LayoutN l2 l3) a</li><li class="src short"><a href="#v:layoutR">layoutR</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> a, LayoutClass l1 a, LayoutClass l2 a, LayoutClass l3 a) =&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a> -&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a> -&gt; l1 a -&gt; LayoutN l2 l3 a -&gt; LayoutN l1 (LayoutN l2 l3) a</li><li class="src short"><a href="#v:layoutAll">layoutAll</a> :: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> a, LayoutClass l1 a) =&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a> -&gt; l1 a -&gt; LayoutN l1 Full a</li><li class="src short"><span class="keyword">data</span>  <a href="#t:IncLayoutN">IncLayoutN</a>  = <a href="#v:IncLayoutN">IncLayoutN</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></li><li class="src short"><span class="keyword">data</span>  <a href="#t:SubMeasure">SubMeasure</a> <ul class="subs"><li>= <a href="#v:Abs">Abs</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>  </li><li>| <a href="#v:Rel">Rel</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:SubBox">SubBox</a>  = <a href="#v:SubBox">SubBox</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a></li><li class="src short"><a href="#v:absBox">absBox</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> -&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></li><li class="src short"><a href="#v:relBox">relBox</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a> -&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></li></ul></div><div id="interface"><h1 id="g:1">Usage
</h1><div class="doc"><p>You can use this module with the following in your <code>~/.xmonad/xmonad.hs</code>:
</p><pre> import XMonad.Layout.LayoutBuilder
</pre><p>Then edit your <code>layoutHook</code> by adding something like:
</p><pre> myLayout = ( (layoutN 1 (relBox 0 0 0.5 1) (Just $ relBox 0 0 1 1) $ simpleTabbed)
             $ (layoutAll (relBox 0.5 0 1 1)                         $ simpleTabbed)
             ) |||
             ( (layoutN 1       (relBox (1/3) 0 (1/2) 1) (Just $ relBox 0 0 1 1) $ Tall 0 0.01 0.5)
             $ (layoutR 0.1 0.5 (relBox (2/3) 0 1     1) Nothing                 $ Tall 0 0.01 0.5)
             $ (layoutAll       (relBox 0     0 (1/3) 1)                         $ Tall 0 0.01 0.5)
             ) |||
             ( (layoutN 1 (absBox (-512-200) 0 512        0) (Just $ relBox 0 0 1 1) $ simpleTabbed)
             $ (layoutN 1 (absBox (-200)     0 0          0) Nothing                 $ simpleTabbed)
             $ (layoutAll (absBox 0          0 (-512-200) 0)                         $ simpleTabbed)
             ) ||| Full ||| etc...
 main = xmonad defaultConfig { layoutHook = myLayout }
</pre><p>This will produce a layout similar to DragPane, but with the possibility to have multiple windows in the left half
 and tabs that show the available windows. It will also produce a layout similar to ThreeColMid and a special layout
 created for use with a 80 columns wide Emacs window, its sidebar and a tabbed area for all other windows.
</p><p>This module can be used to create many different custom layouts, but there are limitations. The primary limitation
 can be observed in the second and third example when there are only two columns with windows in them. The leftmost
 area is left blank. These blank areas can be avoided by placing the rectangles appropriately.
</p><p>These examples require <a href="XMonad-Layout-Tabbed.html">XMonad.Layout.Tabbed</a>.
</p><p>For more detailed instructions on editing the layoutHook see:
</p><p><a href="XMonad-Doc-Extending.html#Editing_the_layout_hook">XMonad.Doc.Extending</a>
</p><p>You may wish to add the following keybindings:
</p><pre>    , ((modm .|. shiftMask, xK_h ), sendMessage $ IncLayoutN (-1))
    , ((modm .|. shiftMask, xK_l ), sendMessage $ IncLayoutN 1)
</pre><p>For detailed instruction on editing the key binding see:
</p><p><a href="XMonad-Doc-Extending.html#Editing_key_bindings">XMonad.Doc.Extending</a>.
</p></div><div class="top"><p class="src"><a name="v:layoutN" class="def">layoutN</a><a href="src/XMonad-Layout-LayoutBuilder.html#layoutN" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> a, LayoutClass l1 a, LayoutClass l2 a, LayoutClass l3 a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>The number of windows to handle
</p></td></tr><tr><td class="src">-&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc"><p>The box to place the windows in
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc"><p>Possibly an alternative box that is used when this layout handles all windows that are left
</p></td></tr><tr><td class="src">-&gt; l1 a</td><td class="doc"><p>The layout to use in the specified area
</p></td></tr><tr><td class="src">-&gt; LayoutN l2 l3 a</td><td class="doc"><p>Where to send the remaining windows
</p></td></tr><tr><td class="src">-&gt; LayoutN l1 (LayoutN l2 l3) a</td><td class="doc"><p>The resulting layout
</p></td></tr></table></div><div class="doc"><p>Use the specified layout in the described area for N windows and send the rest of the windows to the next layout in the chain.
   It is possible to supply an alternative area that will then be used instead, if there are no windows to send to the next layout.
</p></div></div><div class="top"><p class="src"><a name="v:layoutR" class="def">layoutR</a><a href="src/XMonad-Layout-LayoutBuilder.html#layoutR" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> a, LayoutClass l1 a, LayoutClass l2 a, LayoutClass l3 a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc"><p>How much to change the ratio with each IncLayoutN
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc"><p>The ratio of the remaining windows to handle
</p></td></tr><tr><td class="src">-&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc"><p>The box to place the windows in
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc"><p>Possibly an alternative box that is used when this layout handles all windows that are left
</p></td></tr><tr><td class="src">-&gt; l1 a</td><td class="doc"><p>The layout to use in the specified area
</p></td></tr><tr><td class="src">-&gt; LayoutN l2 l3 a</td><td class="doc"><p>Where to send the remaining windows
</p></td></tr><tr><td class="src">-&gt; LayoutN l1 (LayoutN l2 l3) a</td><td class="doc"><p>The resulting layout
</p></td></tr></table></div><div class="doc"><p>As layoutN, but the number of windows is given relative to the total number of windows remaining to be handled. The first
   argument is how much to change the ratio when using IncLayoutN, and the second is the initial ratio.
</p></div></div><div class="top"><p class="src"><a name="v:layoutAll" class="def">layoutAll</a><a href="src/XMonad-Layout-LayoutBuilder.html#layoutAll" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: (<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> a, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Eq.html#t:Eq">Eq</a> a, LayoutClass l1 a)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">=&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc"><p>The box to place the windows in
</p></td></tr><tr><td class="src">-&gt; l1 a</td><td class="doc"><p>The layout to use in the specified area
</p></td></tr><tr><td class="src">-&gt; LayoutN l1 Full a</td><td class="doc"><p>The resulting layout
</p></td></tr></table></div><div class="doc"><p>Use the specified layout in the described area for all remaining windows.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:IncLayoutN" class="def">IncLayoutN</a>  <a href="src/XMonad-Layout-LayoutBuilder.html#IncLayoutN" class="link">Source</a></p><div class="doc"><p>Change the number of windows handled by the focused layout.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:IncLayoutN" class="def">IncLayoutN</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:IncLayoutN" class="caption collapser" onclick="toggleSection('i:IncLayoutN')">Instances</p><div id="section.i:IncLayoutN" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Typeable.html#t:Typeable">Typeable</a> <a href="XMonad-Layout-LayoutBuilder.html#t:IncLayoutN">IncLayoutN</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Message <a href="XMonad-Layout-LayoutBuilder.html#t:IncLayoutN">IncLayoutN</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SubMeasure" class="def">SubMeasure</a>  <a href="src/XMonad-Layout-LayoutBuilder.html#SubMeasure" class="link">Source</a></p><div class="doc"><p>The absolute or relative measures used to describe the area a layout should be placed in. For negative absolute values
   the total remaining space will be added. For sizes, the remaining space will also be added for zeroes. Relative values
   are applied on the remaining space after the top-left corner of the box have been removed.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Abs" class="def">Abs</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Rel" class="def">Rel</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:SubMeasure" class="caption collapser" onclick="toggleSection('i:SubMeasure')">Instances</p><div id="section.i:SubMeasure" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SubBox" class="def">SubBox</a>  <a href="src/XMonad-Layout-LayoutBuilder.html#SubBox" class="link">Source</a></p><div class="doc"><p>A box to place a layout in. The stored values are xpos, ypos, width and height.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:SubBox" class="def">SubBox</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubMeasure">SubMeasure</a></td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:SubBox" class="caption collapser" onclick="toggleSection('i:SubBox')">Instances</p><div id="section.i:SubBox" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Read.html#t:Read">Read</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Text-Show.html#t:Show">Show</a> <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:absBox" class="def">absBox</a><a href="src/XMonad-Layout-LayoutBuilder.html#absBox" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Absolute X-Position
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Absolute Y-Position
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Absolute width
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>Absolute height
</p></td></tr><tr><td class="src">-&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc"><p>The resulting <code><a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></code> describing the area
</p></td></tr></table></div><div class="doc"><p>Create a box with only absolute measurements. If the values are negative, the total remaining space will be added. For
   sizes it will also be added for zeroes.
</p></div></div><div class="top"><p class="src"><a name="v:relBox" class="def">relBox</a><a href="src/XMonad-Layout-LayoutBuilder.html#relBox" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc"><p>Relative X-Position with respect to the surrounding area
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc"><p>Relative Y-Position with respect to the surrounding area
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc"><p>Relative width with respect to the remaining width
</p></td></tr><tr><td class="src">-&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Rational">Rational</a></td><td class="doc"><p>Relative height with respect to the remaining height
</p></td></tr><tr><td class="src">-&gt; <a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></td><td class="doc"><p>The resulting <code><a href="XMonad-Layout-LayoutBuilder.html#t:SubBox">SubBox</a></code> describing the area
</p></td></tr></table></div><div class="doc"><p>Create a box with only relative measurements.
</p></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.9.2</p></div></body></html>