<!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.Hooks.PositionStoreHooks</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-Hooks-PositionStoreHooks.html");}; //]]> </script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Hooks-PositionStoreHooks.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.11: Third party extensions for xmonad</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Portability</th><td>not portable</td></tr><tr><th>Stability</th><td>unstable</td></tr><tr><th>Maintainer</th><td>jan.vornberger@informatik.uni-oldenburg.de</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">XMonad.Hooks.PositionStoreHooks</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>This module contains two hooks for the PositionStore (see <a href="XMonad-Util-PositionStore.html">XMonad.Util.PositionStore</a>) - a ManageHook and an EventHook. </p><p>The ManageHook can be used to fill the PositionStore with position and size information about new windows. The advantage of using this hook is, that the information is recorded independent of the currently active layout. So the floating shape of the window can later be restored even if it was opened in a tiled layout initially. </p><p>For windows, that do not request a particular position, a random position will be assigned. This prevents windows from piling up exactly on top of each other. </p><p>The EventHook makes sure that windows are deleted from the PositionStore when they are closed. </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:positionStoreManageHook">positionStoreManageHook</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="XMonad-Layout-Decoration.html#t:Theme">Theme</a> -> <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:ManageHook">ManageHook</a></li><li class="src short"><a href="#v:positionStoreEventHook">positionStoreEventHook</a> :: <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Xlib-Extras.html#t:Event">Event</a> -> <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Monoid.html#t:All">All</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.Hooks.PositionStoreHooks </pre><p>and adding <code><a href="XMonad-Hooks-PositionStoreHooks.html#v:positionStoreManageHook">positionStoreManageHook</a></code> to your <code><a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:ManageHook">ManageHook</a></code> as well as <code><a href="XMonad-Hooks-PositionStoreHooks.html#v:positionStoreEventHook">positionStoreEventHook</a></code> to your event hooks. To be accurate about window sizes, the module needs to know if any decoration is in effect. This is specified with the first argument: Supply <code><a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#v:Nothing">Nothing</a></code> for no decoration, otherwise use 'Just defaultTheme' or similar to inform the module about the decoration theme used. </p><pre> myManageHook = positionStoreManageHook Nothing <+> manageHook defaultConfig myHandleEventHook = positionStoreEventHook main = xmonad defaultConfig { manageHook = myManageHook , handleEventHook = myHandleEventHook } </pre></div><div class="top"><p class="src"><a name="v:positionStoreManageHook" class="def">positionStoreManageHook</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="XMonad-Layout-Decoration.html#t:Theme">Theme</a> -> <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:ManageHook">ManageHook</a><a href="src/XMonad-Hooks-PositionStoreHooks.html#positionStoreManageHook" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:positionStoreEventHook" class="def">positionStoreEventHook</a> :: <a href="/usr/share/doc/ghc/html/libraries/X11-1.6.0/Graphics-X11-Xlib-Extras.html#t:Event">Event</a> -> <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:X">X</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Monoid.html#t:All">All</a><a href="src/XMonad-Hooks-PositionStoreHooks.html#positionStoreEventHook" class="link">Source</a></p></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.10.0</p></div></body></html>