Sophie

Sophie

distrib > Fedora > 14 > i386 > by-pkgid > 97b7e04d4a67814e1160568251f09714 > files > 410

ghc-xmonad-contrib-devel-0.9.1-8.fc14.i686.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--Rendered using the Haskell Html Library v0.2-->
<HTML
><HEAD
><META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8"
><TITLE
>XMonad.Actions.TopicSpace</TITLE
><LINK HREF="haddock.css" REL="stylesheet" TYPE="text/css"
><SCRIPT SRC="haddock-util.js" TYPE="text/javascript"
></SCRIPT
><SCRIPT TYPE="text/javascript"
>window.onload = function () {setSynopsis("mini_XMonad-Actions-TopicSpace.html")};</SCRIPT
></HEAD
><BODY
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="topbar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><IMG SRC="haskell_icon.gif" WIDTH="16" HEIGHT="16" ALT=" "
></TD
><TD CLASS="title"
>xmonad-contrib-0.9.1: Third party extensions for xmonad</TD
><TD CLASS="topbut"
><A HREF="src/XMonad-Actions-TopicSpace.html"
>Source code</A
></TD
><TD CLASS="topbut"
><A HREF="index.html"
>Contents</A
></TD
><TD CLASS="topbut"
><A HREF="doc-index.html"
>Index</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="modulebar"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD
><FONT SIZE="6"
>XMonad.Actions.TopicSpace</FONT
></TD
><TD ALIGN="right"
><TABLE CLASS="narrow" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="infohead"
>Portability</TD
><TD CLASS="infoval"
>unportable</TD
></TR
><TR
><TD CLASS="infohead"
>Stability</TD
><TD CLASS="infoval"
>unstable</TD
></TR
><TR
><TD CLASS="infohead"
>Maintainer</TD
><TD CLASS="infoval"
>Nicolas Pouillard &lt;nicolas.pouillard@gmail.com&gt;</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="section4"
><B
>Contents</B
></TD
></TR
><TR
><TD
><DL
><DT
><A HREF="#1"
>Overview
</A
></DT
><DT
><A HREF="#2"
>Usage
</A
></DT
></DL
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Description</TD
></TR
><TR
><TD CLASS="doc"
>Turns your workspaces into a more topic oriented system.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
>Synopsis</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3ATopic"
>Topic</A
> = <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>type</SPAN
> <A HREF="#t%3ADir"
>Dir</A
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><SPAN CLASS="keyword"
>data</SPAN
>  <A HREF="#t%3ATopicConfig"
>TopicConfig</A
>  = <A HREF="#v%3ATopicConfig"
>TopicConfig</A
> {<TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="recfield"
><A HREF="#v%3AtopicDirs"
>topicDirs</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
> <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> <A HREF="XMonad-Actions-TopicSpace.html#t%3ADir"
>Dir</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AtopicActions"
>topicActions</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
> <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
>)</TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AdefaultTopicAction"
>defaultTopicAction</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AdefaultTopic"
>defaultTopic</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
></TD
></TR
><TR
><TD CLASS="recfield"
><A HREF="#v%3AmaxTopicHistory"
>maxTopicHistory</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
></TR
></TABLE
>}</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AgetLastFocusedTopics"
>getLastFocusedTopics</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AsetLastFocusedTopic"
>setLastFocusedTopic</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; (<A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3ApprWindowSet"
>pprWindowSet</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Hooks-DynamicLog.html#t%3APP"
>PP</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtopicActionWithPrompt"
>topicActionWithPrompt</A
> :: <A HREF="XMonad-Prompt.html#t%3AXPConfig"
>XPConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AtopicAction"
>topicAction</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcurrentTopicAction"
>currentTopicAction</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AswitchTopic"
>switchTopic</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AswitchNthLastFocused"
>switchNthLastFocused</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AshiftNthLastFocused"
>shiftNthLastFocused</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcurrentTopicDir"
>currentTopicDir</A
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AcheckTopicConfig"
>checkTopicConfig</A
> :: [<A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
>] -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3A%3E%2A%3E"
>(&gt;*&gt;)</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Control-Monad.html#t%3AMonad"
>Monad</A
> m =&gt; m a -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; m <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="1"
><A NAME="1"
>Overview
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="doc"
>This module allows to organize your workspaces on a precise topic basis.  So
 instead of having a workspace called work you can setup one workspace per
 task.  Here we call these workspaces, topics. The great thing with
 topics is that one can attach a directory that makes sense to each
 particular topic.  One can also attach an action which will be triggered
 when switching to a topic that does not have any windows in it.  So you can
 attach your mail client to the mail topic, some terminals in the right
 directory to the xmonad topic... This package also provides a nice way to
 display your topics in an historical way using a custom <TT
><A HREF="XMonad-Actions-TopicSpace.html#v%3ApprWindowSet"
>pprWindowSet</A
></TT
>
 function. You can also easily switch to recent topics using this history
 of last focused topics.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="section1"
><A NAME="2"
><A NAME="2"
>Usage
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="doc"
><P
>Here is an example of configuration using TopicSpace:
</P
><PRE
> -- The list of all topics/workspaces of your xmonad configuration.
 -- The order is important, new topics must be inserted
 -- at the end of the list if you want hot-restarting
 -- to work.
 myTopics :: [Topic]
 myTopics =
   [ &quot;dashboard&quot; -- the first one
   , &quot;admin&quot;, &quot;build&quot;, &quot;cleaning&quot;, &quot;conf&quot;, &quot;darcs&quot;, &quot;haskell&quot;, &quot;irc&quot;
   , &quot;mail&quot;, &quot;movie&quot;, &quot;music&quot;, &quot;talk&quot;, &quot;text&quot;, &quot;tools&quot;, &quot;web&quot;, &quot;xmonad&quot;
   , &quot;yi&quot;, &quot;documents&quot;, &quot;twitter&quot;, &quot;pdf&quot;
   ]

 myTopicConfig :: TopicConfig
 myTopicConfig = defaultTopicConfig
   { topicDirs = M.fromList $
       [ (&quot;conf&quot;, &quot;w/conf&quot;)
       , (&quot;dashboard&quot;, &quot;Desktop&quot;)
       , (&quot;yi&quot;, &quot;w/dev-haskell/yi&quot;)
       , (&quot;darcs&quot;, &quot;w/dev-haskell/darcs&quot;)
       , (&quot;haskell&quot;, &quot;w/dev-haskell&quot;)
       , (&quot;xmonad&quot;, &quot;w/dev-haskell/xmonad&quot;)
       , (&quot;tools&quot;, &quot;w/tools&quot;)
       , (&quot;movie&quot;, &quot;Movies&quot;)
       , (&quot;talk&quot;, &quot;w/talks&quot;)
       , (&quot;music&quot;, &quot;Music&quot;)
       , (&quot;documents&quot;, &quot;w/documents&quot;)
       , (&quot;pdf&quot;, &quot;w/documents&quot;)
       ]
   , defaultTopicAction = const $ spawnShell &gt;*&gt; 3
   , defaultTopic = &quot;dashboard&quot;
   , topicActions = M.fromList $
       [ (&quot;conf&quot;,       spawnShell &gt;&gt; spawnShellIn &quot;wd/ertai/private&quot;)
       , (&quot;darcs&quot;,      spawnShell &gt;*&gt; 3)
       , (&quot;yi&quot;,         spawnShell &gt;*&gt; 3)
       , (&quot;haskell&quot;,    spawnShell &gt;*&gt; 2 &gt;&gt;
                        spawnShellIn &quot;wd/dev-haskell/ghc&quot;)
       , (&quot;xmonad&quot;,     spawnShellIn &quot;wd/x11-wm/xmonad&quot; &gt;&gt;
                        spawnShellIn &quot;wd/x11-wm/xmonad/contrib&quot; &gt;&gt;
                        spawnShellIn &quot;wd/x11-wm/xmonad/utils&quot; &gt;&gt;
                        spawnShellIn &quot;.xmonad&quot; &gt;&gt;
                        spawnShellIn &quot;.xmonad&quot;)
       , (&quot;mail&quot;,       mailAction)
       , (&quot;irc&quot;,        ssh somewhere)
       , (&quot;admin&quot;,      ssh somewhere &gt;&gt;
                        ssh nowhere)
       , (&quot;dashboard&quot;,  spawnShell)
       , (&quot;twitter&quot;,    spawnShell)
       , (&quot;web&quot;,        spawn browserCmd)
       , (&quot;movie&quot;,      spawnShell)
       , (&quot;documents&quot;,  spawnShell &gt;*&gt; 2 &gt;&gt;
                        spawnShellIn &quot;Documents&quot; &gt;*&gt; 2)
       , (&quot;pdf&quot;,        spawn pdfViewerCmd)
       ]
   }

 -- extend your keybindings
 myKeys conf@XConfig{modMask=modm} =
   [ ((modm              , xK_n     ), spawnShell) -- %! Launch terminal
   , ((modm              , xK_a     ), currentTopicAction myTopicConfig)
   , ((modm              , xK_g     ), promptedGoto)
   , ((modm .|. shiftMask, xK_g     ), promptedShift)
   {- more  keys ... -}
   ]
   ++
   [ ((modm, k), switchNthLastFocused myTopicConfig i)
   | (i, k) &lt;- zip [1..] workspaceKeys]

 spawnShell :: X ()
 spawnShell = currentTopicDir myTopicConfig &gt;&gt;= spawnShellIn

 spawnShellIn :: Dir -&gt; X ()
 spawnShellIn dir = spawn $ &quot;urxvt '(cd ''&quot; ++ dir ++ &quot;'' &amp;&amp; &quot; ++ myShell ++ &quot; )'&quot;

 goto :: Topic -&gt; X ()
 goto = switchTopic myTopicConfig

 promptedGoto :: X ()
 promptedGoto = workspacePrompt myXPConfig goto

 promptedShift :: X ()
 promptedShift = workspacePrompt myXPConfig $ windows . W.shift

 myConfig = do
     checkTopicConfig myTopics myTopicConfig
     myLogHook &lt;- makeMyLogHook
     return $ defaultConfig
          { borderWidth = 1 -- Width of the window border in pixels.
          , workspaces = myTopics
          , layoutHook = myModifiers myLayout
          , manageHook = myManageHook
          , logHook = myLogHook
          , handleEventHook = myHandleEventHook
          , terminal = myTerminal -- The preferred terminal program.
          , normalBorderColor = &quot;#3f3c6d&quot;
          , focusedBorderColor = &quot;#4f66ff&quot;
          , XMonad.modMask = mod1Mask
          , keys = myKeys
          , mouseBindings = myMouseBindings
          }

 main :: IO ()
 main = xmonad =&lt;&lt; myConfig
</PRE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:Topic"
><A NAME="t%3ATopic"
></A
></A
><B
>Topic</B
> = <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#Topic"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><TT
><A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
></TT
> is just an alias for <TT
><A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
></TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>type</SPAN
> <A NAME="t:Dir"
><A NAME="t%3ADir"
></A
></A
><B
>Dir</B
> = <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#Dir"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
><TT
><A HREF="XMonad-Actions-TopicSpace.html#t%3ADir"
>Dir</A
></TT
> is just an alias for <TT
><A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AFilePath"
>FilePath</A
></TT
> but should points to a directory.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><SPAN CLASS="keyword"
>data</SPAN
>  <A NAME="t:TopicConfig"
><A NAME="t%3ATopicConfig"
></A
></A
><B
>TopicConfig</B
>  </TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#TopicConfig"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>Here is the topic space configuration area.
</TD
></TR
><TR
><TD CLASS="section4"
>Constructors</TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="5" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:TopicConfig"
><A NAME="v%3ATopicConfig"
></A
></A
><B
>TopicConfig</B
></TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="body" COLSPAN="2"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="arg"
><A NAME="v:topicDirs"
><A NAME="v%3AtopicDirs"
></A
></A
><B
>topicDirs</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
> <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> <A HREF="XMonad-Actions-TopicSpace.html#t%3ADir"
>Dir</A
></TD
><TD CLASS="rdoc"
>This mapping associate a directory to each topic.
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:topicActions"
><A NAME="v%3AtopicActions"
></A
></A
><B
>topicActions</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/containers-0.3.0.0/Data-Map.html#t%3AMap"
>Map</A
> <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
>)</TD
><TD CLASS="rdoc"
>This mapping associate an action to trigger when
 switching to a given topic which workspace is empty.
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:defaultTopicAction"
><A NAME="v%3AdefaultTopicAction"
></A
></A
><B
>defaultTopicAction</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="rdoc"
>This is the default topic action.
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:defaultTopic"
><A NAME="v%3AdefaultTopic"
></A
></A
><B
>defaultTopic</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
></TD
><TD CLASS="rdoc"
>This is the default topic.
</TD
></TR
><TR
><TD CLASS="arg"
><A NAME="v:maxTopicHistory"
><A NAME="v%3AmaxTopicHistory"
></A
></A
><B
>maxTopicHistory</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
></TD
><TD CLASS="rdoc"
>This setups the maximum depth of topic history, usually
 10 is a good default since we can bind all of them using
 numeric keypad.
</TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:getLastFocusedTopics"
><A NAME="v%3AgetLastFocusedTopics"
></A
></A
><B
>getLastFocusedTopics</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> [<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
>]</TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#getLastFocusedTopics"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Returns the list of last focused workspaces the empty list otherwise.
 This function rely on a reserved property namely _XMONAD_LAST_FOCUSED_WORKSPACES.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:setLastFocusedTopic"
><A NAME="v%3AsetLastFocusedTopic"
></A
></A
><B
>setLastFocusedTopic</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; (<A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Bool.html#t%3ABool"
>Bool</A
>) -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#setLastFocusedTopic"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Given a <TT
><A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
></TT
>, the last focused topic, and a predicate that will
 select topics that one want to keep, this function will set the property
 of last focused topics.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:pprWindowSet"
><A NAME="v%3ApprWindowSet"
></A
></A
><B
>pprWindowSet</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Hooks-DynamicLog.html#t%3APP"
>PP</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#pprWindowSet"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>This function is a variant of <TT
><A HREF="XMonad-Hooks-DynamicLog.html#v%3ApprWindowSet"
>pprWindowSet</A
></TT
> which takes a topic configuration
 and a pretty-printing record <TT
><A HREF="XMonad-Hooks-DynamicLog.html#t%3APP"
>PP</A
></TT
>. It will show the list of topics sorted historically
 and highlighting topics with urgent windows.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:topicActionWithPrompt"
><A NAME="v%3AtopicActionWithPrompt"
></A
></A
><B
>topicActionWithPrompt</B
> :: <A HREF="XMonad-Prompt.html#t%3AXPConfig"
>XPConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#topicActionWithPrompt"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Given a prompt configuration and a topic configuration, triggers the action associated with
 the topic given in prompt.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:topicAction"
><A NAME="v%3AtopicAction"
></A
></A
><B
>topicAction</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#topicAction"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Given a configuration and a topic, triggers the action associated with the given topic.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:currentTopicAction"
><A NAME="v%3AcurrentTopicAction"
></A
></A
><B
>currentTopicAction</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#currentTopicAction"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Trigger the action associated with the current topic.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:switchTopic"
><A NAME="v%3AswitchTopic"
></A
></A
><B
>switchTopic</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#switchTopic"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Switch to the given topic.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:switchNthLastFocused"
><A NAME="v%3AswitchNthLastFocused"
></A
></A
><B
>switchNthLastFocused</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#switchNthLastFocused"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Switch to the Nth last focused topic or failback to the <TT
><A HREF="XMonad-Actions-TopicSpace.html#v%3AdefaultTopic"
>defaultTopic</A
></TT
>.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:shiftNthLastFocused"
><A NAME="v%3AshiftNthLastFocused"
></A
></A
><B
>shiftNthLastFocused</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#shiftNthLastFocused"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Shift the focused window to the Nth last focused topic, or fallback to doing nothing.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:currentTopicDir"
><A NAME="v%3AcurrentTopicDir"
></A
></A
><B
>currentTopicDir</B
> :: <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AX"
>X</A
> <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Char.html#t%3AString"
>String</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#currentTopicDir"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Returns the directory associated with current topic returns the empty string otherwise.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:checkTopicConfig"
><A NAME="v%3AcheckTopicConfig"
></A
></A
><B
>checkTopicConfig</B
> :: [<A HREF="XMonad-Actions-TopicSpace.html#t%3ATopic"
>Topic</A
>] -&gt; <A HREF="XMonad-Actions-TopicSpace.html#t%3ATopicConfig"
>TopicConfig</A
> -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/System-IO.html#t%3AIO"
>IO</A
> <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#checkTopicConfig"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>Check the given topic configuration for duplicates topics or undefined topics.
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="topdecl"
><TABLE CLASS="declbar"
><TR
><TD CLASS="declname"
><A NAME="v:>*>"
><A NAME="v%3A%3E%2A%3E"
></A
></A
><B
>(&gt;*&gt;)</B
> :: <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Control-Monad.html#t%3AMonad"
>Monad</A
> m =&gt; m a -&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Data-Int.html#t%3AInt"
>Int</A
> -&gt; m <A HREF="/usr/share/doc/ghc/html/libraries/ghc-prim-0.2.0.0/GHC-Unit.html#t%3A%28%29"
>()</A
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Actions-TopicSpace.html#%3E%2A%3E"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="doc"
>An alias for <TT
>flip replicateM_</TT
>
</TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="botbar"
>Produced by <A HREF="http://www.haskell.org/haddock/"
>Haddock</A
> version 2.6.1</TD
></TR
></TABLE
></BODY
></HTML
>