Sophie

Sophie

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

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.Mosaic</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-Mosaic.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Layout-Mosaic.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>vogt.adam&lt;at&gt;gmail.com</td></tr></table><p class="caption">XMonad.Layout.Mosaic</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>Based on MosaicAlt, but aspect ratio messages always change the aspect
 ratios, and rearranging the window stack changes the window sizes.
</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"><span class="keyword">data</span>  <a href="#t:Aspect">Aspect</a> <ul class="subs"><li>= <a href="#v:Taller">Taller</a>  </li><li>| <a href="#v:Wider">Wider</a>  </li><li>| <a href="#v:Reset">Reset</a>  </li><li>| <a href="#v:SlopeMod">SlopeMod</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>])  </li></ul></li><li class="src short"><a href="#v:mosaic">mosaic</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; Mosaic a</li><li class="src short"><a href="#v:changeMaster">changeMaster</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; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:changeFocused">changeFocused</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; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</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.Mosaic
</pre><p>Then edit your <code>layoutHook</code> by adding the Mosaic layout:
</p><pre> myLayout = mosaic 2 [3,2] ||| Full ||| etc..
 main = xmonad $ defaultConfig { layoutHook = myLayout }
</pre><p>Unfortunately, infinite lists break serialization, so don't use them. And if
 the list is too short, it is extended with <code>++ repeat 1</code>, which covers the
 main use case.
</p><p>To change the choice in aspect ratio and the relative sizes of windows, add
 to your keybindings:
</p><pre> , ((modm, xK_a), sendMessage Taller)
 , ((modm, xK_z), sendMessage Wider)
</pre><pre> , ((modm, xK_r), sendMessage Reset)
</pre><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></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Aspect" class="def">Aspect</a>  <a href="src/XMonad-Layout-Mosaic.html#Aspect" class="link">Source</a></p><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Taller" class="def">Taller</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Wider" class="def">Wider</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:Reset" class="def">Reset</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a name="v:SlopeMod" class="def">SlopeMod</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>])</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:Aspect" class="caption collapser" onclick="toggleSection('i:Aspect')">Instances</p><div id="section.i:Aspect" 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-Mosaic.html#t:Aspect">Aspect</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Message <a href="XMonad-Layout-Mosaic.html#t:Aspect">Aspect</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:mosaic" class="def">mosaic</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; Mosaic a<a href="src/XMonad-Layout-Mosaic.html#mosaic" class="link">Source</a></p><div class="doc"><p>The relative magnitudes (the sign is ignored) of the rational numbers in
 the second argument determine the relative areas that the windows receive.
 The first number represents the size of the master window, the second is for
 the next window in the stack, and so on.
</p><p>The list is extended with <code>++ repeat 1</code>, so <code>mosaic 1.5 []</code> is like a
 resizable grid.
</p><p>The first parameter is the multiplicative factor to use when responding to
 the <code>Expand</code> message.
</p></div></div><div class="top"><p class="src"><a name="v:changeMaster" class="def">changeMaster</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; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/XMonad-Layout-Mosaic.html#changeMaster" class="link">Source</a></p><div class="doc"><p>These sample functions are meant to be applied to the list of window sizes
 through the <code><a href="XMonad-Layout-Mosaic.html#v:SlopeMod">SlopeMod</a></code> message.
</p></div></div><div class="top"><p class="src"><a name="v:changeFocused" class="def">changeFocused</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; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a><a href="src/XMonad-Layout-Mosaic.html#changeFocused" class="link">Source</a></p><div class="doc"><p>Apply a function to the Rational that represents the currently focused
 window.
</p><p><code>Expand</code> and <code>Shrink</code> messages are responded to with <code>changeFocused
 (*delta)</code> or <code>changeFocused (delta/)</code> where <code>delta</code> is the first argument to
 <code><a href="XMonad-Layout-Mosaic.html#v:mosaic">mosaic</a></code>.
</p><p>This is exported because other functions (ex. <code>const 1</code>, <code>(+1)</code>) may be
 useful to apply to the current area.
</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>