Sophie

Sophie

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

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.Hooks.XPropManage</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-XPropManage.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Hooks-XPropManage.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>Karsten Schoelzel &lt;kuser@gmx.de&gt;</td></tr></table><p class="caption">XMonad.Hooks.XPropManage</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 ManageHook matching on XProperties.
</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:xPropManageHook">xPropManageHook</a> :: [<a href="XMonad-Hooks-XPropManage.html#t:XPropMatch">XPropMatch</a>] -&gt; ManageHook</li><li class="src short"><span class="keyword">type</span> <a href="#t:XPropMatch">XPropMatch</a> = ([(<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Atom">Atom</a>, [<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>] -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>)], <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X (WindowSet -&gt; WindowSet))</li><li class="src short"><a href="#v:pmX">pmX</a> :: (<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X (WindowSet -&gt; WindowSet)</li><li class="src short"><a href="#v:pmP">pmP</a> :: (WindowSet -&gt; WindowSet) -&gt; <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X (WindowSet -&gt; WindowSet)</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.XPropManage
 import qualified XMonad.StackSet as W
 import XMonad.Actions.TagWindows
 import Data.List
</pre><pre> manageHook = xPropManageHook xPropMatches

 xPropMatches :: [XPropMatch]
 xPropMatches = [ ([ (wM_CLASS, any (&quot;gimp&quot;==))], (\w -&gt; float w &gt;&gt; return (W.shift &quot;2&quot;)))
                , ([ (wM_COMMAND, any (&quot;screen&quot; ==)), (wM_CLASS, any (&quot;xterm&quot; ==))], pmX (addTag &quot;screen&quot;))
                , ([ (wM_NAME, any (&quot;Iceweasel&quot; `isInfixOf`))], pmP (W.shift &quot;3&quot;))
                ]
</pre><p>Properties known to work: wM_CLASS, wM_NAME, wM_COMMAND
</p><p>A XPropMatch consists of a list of conditions and function telling what to do.
</p><p>The list entries are pairs of an XProperty to match on (like wM_CLASS, wM_NAME)^1,
 and an function which matches onto the value of the property (represented as a List
 of Strings).
</p><p>If a match succeeds the function is called immediately, can perform any action and then return
 a function to apply in <code>windows</code> (see Operations.hs). So if the action does only work on the
 WindowSet use just 'pmP function'.
</p><p>*1 You can get the available properties of an application with the xprop utility. STRING properties
 should work fine. Others might not work.
</p></div><div class="top"><p class="src"><a name="v:xPropManageHook" class="def">xPropManageHook</a> :: [<a href="XMonad-Hooks-XPropManage.html#t:XPropMatch">XPropMatch</a>] -&gt; ManageHook<a href="src/XMonad-Hooks-XPropManage.html#xPropManageHook" class="link">Source</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:XPropMatch" class="def">XPropMatch</a> = ([(<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Atom">Atom</a>, [<a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Char.html#t:String">String</a>] -&gt; <a href="/usr/share/doc/ghc/html/libraries/base-4.3.1.0/Data-Bool.html#t:Bool">Bool</a>)], <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X (WindowSet -&gt; WindowSet))<a href="src/XMonad-Hooks-XPropManage.html#XPropMatch" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:pmX" class="def">pmX</a> :: (<a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X <a href="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t:-40--41-">()</a>) -&gt; <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X (WindowSet -&gt; WindowSet)<a href="src/XMonad-Hooks-XPropManage.html#pmX" class="link">Source</a></p></div><div class="top"><p class="src"><a name="v:pmP" class="def">pmP</a> :: (WindowSet -&gt; WindowSet) -&gt; <a href="/usr/share/doc/ghc/html/libraries/X11-1.5.0.0/Graphics-X11-Types.html#t:Window">Window</a> -&gt; X (WindowSet -&gt; WindowSet)<a href="src/XMonad-Hooks-XPropManage.html#pmP" 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.9.2</p></div></body></html>