Sophie

Sophie

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

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.Gaps</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-Gaps.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Layout-Gaps.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>&lt;byorgey@gmail.com&gt;</td></tr></table><p class="caption">XMonad.Layout.Gaps</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>Create manually-sized gaps along edges of the screen which will not
 be used for tiling, along with support for toggling gaps on and
 off.
</p><p>Note that <a href="XMonad-Hooks-ManageDocks.html">XMonad.Hooks.ManageDocks</a> is the preferred solution for
 leaving space for your dock-type applications (status bars,
 toolbars, docks, etc.), since it automatically sets up appropriate
 gaps, allows them to be toggled, etc.  However, this module may
 still be useful in some situations where the automated approach of
 ManageDocks does not work; for example, to work with a dock-type
 application that does not properly set the STRUTS property, or to
 leave part of the screen blank which is truncated by a projector,
 and so on.
</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:Direction2D">Direction2D</a> <ul class="subs"><li>= <a href="#v:U">U</a>  </li><li>| <a href="#v:D">D</a>  </li><li>| <a href="#v:R">R</a>  </li><li>| <a href="#v:L">L</a>  </li></ul></li><li class="src short"><span class="keyword">type</span> <a href="#t:GapSpec">GapSpec</a> = [(<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</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"><a href="#v:gaps">gaps</a> ::  <a href="XMonad-Layout-Gaps.html#t:GapSpec">GapSpec</a> -&gt; l a -&gt; <a href="XMonad-Layout-LayoutModifier.html#t:ModifiedLayout">ModifiedLayout</a> Gaps l a</li><li class="src short"><span class="keyword">data</span>  <a href="#t:GapMessage">GapMessage</a> <ul class="subs"><li>= <a href="#v:ToggleGaps">ToggleGaps</a>  </li><li>| <a href="#v:ToggleGap">ToggleGap</a> !<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a>  </li><li>| <a href="#v:IncGap">IncGap</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> !<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a>  </li><li>| <a href="#v:DecGap">DecGap</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> !<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a>  </li></ul></li></ul></div><div id="interface"><h1 id="g:1">Usage
</h1><div class="doc"><p>You can use this module by importing it into your <code>~/.xmonad/xmonad.hs</code> file:
</p><pre> import XMonad.Layout.Gaps
</pre><p>and applying the <code><a href="XMonad-Layout-Gaps.html#v:gaps">gaps</a></code> modifier to your layouts as follows (for
 example):
</p><pre> layoutHook = gaps [(U,18), (R,23)] $ Tall 1 (3/100) (1/2) ||| Full  -- leave gaps at the top and right
</pre><p>You can additionally add some keybindings to toggle or modify the gaps,
 for example:
</p><pre> , ((modm .|. controlMask, xK_g), sendMessage $ ToggleGaps)  -- toggle all gaps
 , ((modm .|. controlMask, xK_t), sendMessage $ ToggleGap U) -- toggle the top gap
 , ((modm .|. controlMask, xK_w), sendMessage $ IncGap R 5)  -- increment the right-hand gap
 , ((modm .|. controlMask, xK_q), sendMessage $ DecGap R 5)  -- decrement the right-hand gap
</pre><p>If you want complete control over all gaps, you could include
 something like this in your keybindings, assuming in this case you
 are using <code>XMonad.Util.EZConfig.mkKeymap</code> or
 <code>XMonad.Util.EZConfig.additionalKeysP</code> from <a href="XMonad-Util-EZConfig.html">XMonad.Util.EZConfig</a>
 for string keybinding specifications:
</p><pre> ++
 [ (&quot;M-g &quot; ++ f ++ &quot; &quot; ++ k, sendMessage $ m d)
     | (k, d) &lt;- [(&quot;a&quot;,L), (&quot;s&quot;,D), (&quot;w&quot;,U), (&quot;d&quot;,R)]
     , (f, m) &lt;- [(&quot;v&quot;, ToggleGap), (&quot;h&quot;, IncGap 10), (&quot;f&quot;, DecGap 10)]
 ]
</pre><p>Given the above keybinding definition, for example, you could type
 <code>M-g, v, a</code> to toggle the top gap.
</p><p>To configure gaps differently per-screen, use
 <a href="XMonad-Layout-PerScreen.html">XMonad.Layout.PerScreen</a> (coming soon).
</p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Direction2D" class="def">Direction2D</a>  <a href="src/XMonad-Util-Types.html#Direction2D" class="link">Source</a></p><div class="doc"><p>Two-dimensional directions:
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:U" class="def">U</a></td><td class="doc"><p>Up
</p></td></tr><tr><td class="src"><a name="v:D" class="def">D</a></td><td class="doc"><p>Down
</p></td></tr><tr><td class="src"><a name="v:R" class="def">R</a></td><td class="doc"><p>Right
</p></td></tr><tr><td class="src"><a name="v:L" class="def">L</a></td><td class="doc"><p>Left
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Direction2D" class="caption collapser" onclick="toggleSection('i:Direction2D')">Instances</p><div id="section.i:Direction2D" class="show"><table><tr><td class="src"><a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Prelude.html#t:Bounded">Bounded</a> <a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</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/Prelude.html#t:Enum">Enum</a> <a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</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/Data-Eq.html#t:Eq">Eq</a> <a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</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/Data-Ord.html#t:Ord">Ord</a> <a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</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-Read.html#t:Read">Read</a> <a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</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-Gaps.html#t:Direction2D">Direction2D</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/Data-Typeable.html#t:Typeable">Typeable</a> <a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:GapSpec" class="def">GapSpec</a> = [(<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a>, <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a>)]<a href="src/XMonad-Layout-Gaps.html#GapSpec" class="link">Source</a></p><div class="doc"><p>A manual gap configuration.  Each side of the screen on which a
   gap is enabled is paired with a size in pixels.
</p></div></div><div class="top"><p class="src"><a name="v:gaps" class="def">gaps</a><a href="src/XMonad-Layout-Gaps.html#gaps" class="link">Source</a></p><div class="subs arguments"><p class="caption">Arguments</p><table><tr><td class="src">:: <a href="XMonad-Layout-Gaps.html#t:GapSpec">GapSpec</a></td><td class="doc"><p>The gaps to allow, paired with their initial sizes.
</p></td></tr><tr><td class="src">-&gt; l a</td><td class="doc"><p>The layout to modify.
</p></td></tr><tr><td class="src">-&gt; <a href="XMonad-Layout-LayoutModifier.html#t:ModifiedLayout">ModifiedLayout</a> Gaps l a</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="doc"><p>Add togglable manual gaps to a layout.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:GapMessage" class="def">GapMessage</a>  <a href="src/XMonad-Layout-Gaps.html#GapMessage" class="link">Source</a></p><div class="doc"><p>Messages which can be sent to a gap modifier.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:ToggleGaps" class="def">ToggleGaps</a></td><td class="doc"><p>Toggle all gaps.
</p></td></tr><tr><td class="src"><a name="v:ToggleGap" class="def">ToggleGap</a> !<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a></td><td class="doc"><p>Toggle a single gap.
</p></td></tr><tr><td class="src"><a name="v:IncGap" class="def">IncGap</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> !<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a></td><td class="doc"><p>Increase a gap by a certain number of pixels.
</p></td></tr><tr><td class="src"><a name="v:DecGap" class="def">DecGap</a> !<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Int.html#t:Int">Int</a> !<a href="XMonad-Layout-Gaps.html#t:Direction2D">Direction2D</a></td><td class="doc"><p>Decrease a gap.
</p></td></tr></table></div><div class="subs instances"><p id="control.i:GapMessage" class="caption collapser" onclick="toggleSection('i:GapMessage')">Instances</p><div id="section.i:GapMessage" 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-Gaps.html#t:GapMessage">GapMessage</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src">Message <a href="XMonad-Layout-Gaps.html#t:GapMessage">GapMessage</a></td><td class="doc empty">&nbsp;</td></tr></table></div></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>