Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > 16551e78563a5b49ff9624ee1c8b8101 > files > 715

ghc-xmonad-contrib-devel-0.11-1.1.fc18.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.Actions.GroupNavigation</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-Actions-GroupNavigation.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="src/XMonad-Actions-GroupNavigation.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>unportable</td></tr><tr><th>Stability</th><td>unstable</td></tr><tr><th>Maintainer</th><td>nzeh@cs.dal.ca</td></tr><tr><th>Safe Haskell</th><td>Safe-Infered</td></tr></table><p class="caption">XMonad.Actions.GroupNavigation</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>Provides methods for cycling through groups of windows across
 workspaces, ignoring windows that do not belong to this group.  A
 group consists of all windows matching a user-provided boolean
 query.
</p><p>Also provides a method for jumping back to the most recently used
 window in any given group.
</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:Direction">Direction</a> <ul class="subs"><li>= <a href="#v:Forward">Forward</a>  </li><li>| <a href="#v:Backward">Backward</a>  </li><li>| <a href="#v:History">History</a>  </li></ul></li><li class="src short"><a href="#v:nextMatch">nextMatch</a> :: <a href="XMonad-Actions-GroupNavigation.html#t:Direction">Direction</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:Query">Query</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:nextMatchOrDo">nextMatchOrDo</a> :: <a href="XMonad-Actions-GroupNavigation.html#t:Direction">Direction</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:Query">Query</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a> -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:nextMatchWithThis">nextMatchWithThis</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="XMonad-Actions-GroupNavigation.html#t:Direction">Direction</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:Query">Query</a> a -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li><li class="src short"><a href="#v:historyHook">historyHook</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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a></li></ul></div><div id="interface"><h1 id="g:1">Usage
</h1><div class="doc"><p>Import the module into your <code>~/.xmonad/xmonad.hs</code>:
</p><pre> import XMonad.Actions.GroupNavigation
</pre><p>To support cycling forward and backward through all xterm windows, add
something like this to your keybindings:
</p><pre> , ((modm              , xK_t), nextMatch Forward  (className =? &quot;XTerm&quot;))
 , ((modm .|. shiftMask, xK_t), nextMatch Backward (className =? &quot;XTerm&quot;))
</pre><p>These key combinations do nothing if there is no xterm window open.
If you rather want to open a new xterm window if there is no open
xterm window, use <code><a href="XMonad-Actions-GroupNavigation.html#v:nextMatchOrDo">nextMatchOrDo</a></code> instead:
</p><pre> , ((modm              , xK_t), nextMatchOrDo Forward  (className =? &quot;XTerm&quot;) (spawn &quot;xterm&quot;))
 , ((modm .|. shiftMask, xK_t), nextMatchOrDo Backward (className =? &quot;XTerm&quot;) (spawn &quot;xterm&quot;))
</pre><p>You can use <code><a href="XMonad-Actions-GroupNavigation.html#v:nextMatchWithThis">nextMatchWithThis</a></code> with an arbitrary query to cycle
through all windows for which this query returns the same value as the
current window.  For example, to cycle through all windows in the same
window class as the current window use:
</p><pre> , ((modm , xK_f), nextMatchWithThis Forward  className)
 , ((modm , xK_b), nextMatchWithThis Backward className)
</pre><p>Finally, you can define keybindings to jump to the most recent window
matching a certain Boolean query.  To do this, you need to add
<code><a href="XMonad-Actions-GroupNavigation.html#v:historyHook">historyHook</a></code> to your logHook:
</p><pre> main = xmonad $ defaultConfig { logHook = historyHook }
</pre><p>Then the following keybindings, for example, allow you to return to
the most recent xterm or emacs window or to simply to the most recent
window:
</p><pre> , ((modm .|. controlMask, xK_e),         nextMatch History (className =? &quot;Emacs&quot;))
 , ((modm .|. controlMask, xK_t),         nextMatch History (className =? &quot;XTerm&quot;))
 , ((modm                , xK_BackSpace), nextMatch History (return True))
</pre><p>Again, you can use <code><a href="XMonad-Actions-GroupNavigation.html#v:nextMatchOrDo">nextMatchOrDo</a></code> instead of <code><a href="XMonad-Actions-GroupNavigation.html#v:nextMatch">nextMatch</a></code> if you want
to execute an action if no window matching the query exists. 
</p></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Direction" class="def">Direction</a>  <a href="src/XMonad-Actions-GroupNavigation.html#Direction" class="link">Source</a></p><div class="doc"><p>The direction in which to look for the next match
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Forward" class="def">Forward</a></td><td class="doc"><p>Forward from current window or workspace
</p></td></tr><tr><td class="src"><a name="v:Backward" class="def">Backward</a></td><td class="doc"><p>Backward from current window or workspace
</p></td></tr><tr><td class="src"><a name="v:History" class="def">History</a></td><td class="doc"><p>Backward in history
</p></td></tr></table></div></div><div class="top"><p class="src"><a name="v:nextMatch" class="def">nextMatch</a> :: <a href="XMonad-Actions-GroupNavigation.html#t:Direction">Direction</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:Query">Query</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-GroupNavigation.html#nextMatch" class="link">Source</a></p><div class="doc"><p>Focuses the next window that matches the given boolean query.
 Does nothing if there is no such window.  This is the same as
 <code><a href="XMonad-Actions-GroupNavigation.html#v:nextMatchOrDo">nextMatchOrDo</a></code> with alternate action <code>return ()</code>.
</p></div></div><div class="top"><p class="src"><a name="v:nextMatchOrDo" class="def">nextMatchOrDo</a> :: <a href="XMonad-Actions-GroupNavigation.html#t:Direction">Direction</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:Query">Query</a> <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Bool.html#t:Bool">Bool</a> -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a> -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-GroupNavigation.html#nextMatchOrDo" class="link">Source</a></p><div class="doc"><p>Focuses the next window that matches the given boolean query.  If
 there is no such window, perform the given action instead.
</p></div></div><div class="top"><p class="src"><a name="v:nextMatchWithThis" class="def">nextMatchWithThis</a> :: <a href="/usr/share/doc/ghc/html/libraries/base-4.5.0.0/Data-Eq.html#t:Eq">Eq</a> a =&gt; <a href="XMonad-Actions-GroupNavigation.html#t:Direction">Direction</a> -&gt; <a href="/usr/share/doc/ghc/html/libraries/xmonad-0.11/XMonad-Core.html#t:Query">Query</a> a -&gt; <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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-GroupNavigation.html#nextMatchWithThis" class="link">Source</a></p><div class="doc"><p>Focuses the next window for which the given query produces the
 same result as the currently focused window.  Does nothing if there
 is no focused window (i.e., the current workspace is empty).
</p></div></div><div class="top"><p class="src"><a name="v:historyHook" class="def">historyHook</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/ghc-prim-0.2.0.0/GHC-Tuple.html#t:-40--41-">()</a><a href="src/XMonad-Actions-GroupNavigation.html#historyHook" class="link">Source</a></p><div class="doc"><p>Action that needs to be executed as a logHook to maintain the
 focus history of all windows as the WindowSet changes.
</p></div></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>