Sophie

Sophie

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

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.Layout.PerWorkspace</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-Layout-PerWorkspace.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-Layout-PerWorkspace.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.Layout.PerWorkspace</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"
>&lt;byorgey@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"
>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"
>Configure layouts on a per-workspace basis: use layouts and apply
 layout modifiers selectively, depending on the workspace.
</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"
>data</SPAN
>  <A HREF="#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2 a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AonWorkspace"
>onWorkspace</A
> :: (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l1 a, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l2 a) =&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
> -&gt; l1 a -&gt; l2 a -&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2 a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AonWorkspaces"
>onWorkspaces</A
> :: (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l1 a, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l2 a) =&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
>] -&gt; l1 a -&gt; l2 a -&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2 a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmodWorkspace"
>modWorkspace</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l a =&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
> -&gt; (l a -&gt; <A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l a) -&gt; l a -&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> (<A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l) l a</TD
></TR
><TR
><TD CLASS="s8"
></TD
></TR
><TR
><TD CLASS="decl"
><A HREF="#v%3AmodWorkspaces"
>modWorkspaces</A
> :: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l a =&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
>] -&gt; (l a -&gt; <A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l a) -&gt; l a -&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> (<A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l) l 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"
>Usage
</A
></A
></TD
></TR
><TR
><TD CLASS="s15"
></TD
></TR
><TR
><TD CLASS="doc"
><P
>You can use this module by importing it into your ~/.xmonad/xmonad.hs file:
</P
><PRE
> import XMonad.Layout.PerWorkspace
</PRE
><P
>and modifying your layoutHook as follows (for example):
</P
><PRE
> layoutHook = modWorkspace &quot;baz&quot; m1 $  -- apply layout modifier m1 to all layouts on workspace &quot;baz&quot;
              onWorkspace &quot;foo&quot; l1 $  -- layout l1 will be used on workspace &quot;foo&quot;.
              onWorkspaces [&quot;bar&quot;,&quot;6&quot;] l2 $  -- layout l2 will be used on workspaces &quot;bar&quot; and &quot;6&quot;.
              l3                      -- layout l3 will be used on all other workspaces.
</PRE
><P
>Note that <TT
>l1</TT
>, <TT
>l2</TT
>, and <TT
>l3</TT
> can be arbitrarily complicated
 layouts, e.g. <TT
>(Full ||| smartBorders $ tabbed shrinkText
 defaultTConf ||| ...)</TT
>, and <TT
>m1</TT
> can be any layout modifier, i.e. a
 function of type <TT
>(l a -&gt; ModifiedLayout lm l a)</TT
>.
</P
><P
>In another scenario, suppose you wanted to have layouts A, B, and C
 available on all workspaces, except that on workspace foo you want
 layout D instead of C.  You could do that as follows:
</P
><PRE
> layoutHook = A ||| B ||| onWorkspace &quot;foo&quot; D C
</PRE
></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:PerWorkspace"
><A NAME="t%3APerWorkspace"
></A
></A
><B
>PerWorkspace</B
> l1 l2 a </TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Layout-PerWorkspace.html#PerWorkspace"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="ndoc"
>Structure for representing a workspace-specific layout along with
 a layout for all other workspaces. We store the tags of workspaces
 to be matched, and the two layouts. We save the layout choice in
 the Bool, to be used to implement description.
</TD
></TR
><TR
><TD CLASS="section4"
><IMG SRC="minus.gif" CLASS="coll" ONCLICK="toggle(this,'i:PerWorkspace')" ALT="show/hide"
> Instances</TD
></TR
><TR
><TD CLASS="body"
><DIV ID="i:PerWorkspace" STYLE="display:block;"
><TABLE CLASS="vanilla" CELLSPACING="1" CELLPADDING="0"
><TR
><TD CLASS="decl"
>(<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l1 a, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l2 a, <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> a) =&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> (<A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2) a</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> (l1 a), <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> (l2 a)) =&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Read.html#t%3ARead"
>Read</A
> (<A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2 a)</TD
></TR
><TR
><TD CLASS="decl"
>(<A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> (l1 a), <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> (l2 a)) =&gt; <A HREF="/usr/share/doc/ghc/html/libraries/base-4.2.0.2/Text-Show.html#t%3AShow"
>Show</A
> (<A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2 a)</TD
></TR
></TABLE
></DIV
></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:onWorkspace"
><A NAME="v%3AonWorkspace"
></A
></A
><B
>onWorkspace</B
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Layout-PerWorkspace.html#onWorkspace"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l1 a, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l2 a)</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
></TD
><TD CLASS="rdoc"
>the tag of the workspace to match
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l1 a</TD
><TD CLASS="rdoc"
>layout to use on the matched workspace
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l2 a</TD
><TD CLASS="rdoc"
>layout to use everywhere else
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2 a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Specify one layout to use on a particular workspace, and another
   to use on all others.  The second layout can be another call to
   <TT
><A HREF="XMonad-Layout-PerWorkspace.html#v%3AonWorkspace"
>onWorkspace</A
></TT
>, and so on.
</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:onWorkspaces"
><A NAME="v%3AonWorkspaces"
></A
></A
><B
>onWorkspaces</B
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Layout-PerWorkspace.html#onWorkspaces"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: (<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l1 a, <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l2 a)</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
>]</TD
><TD CLASS="rdoc"
>tags of workspaces to match
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l1 a</TD
><TD CLASS="rdoc"
>layout to use on matched workspaces
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l2 a</TD
><TD CLASS="rdoc"
>layout to use everywhere else
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> l1 l2 a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Specify one layout to use on a particular set of workspaces, and
   another to use on all other workspaces.
</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:modWorkspace"
><A NAME="v%3AmodWorkspace"
></A
></A
><B
>modWorkspace</B
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Layout-PerWorkspace.html#modWorkspace"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
></TD
><TD CLASS="rdoc"
>tag of the workspace to match
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l a -&gt; <A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l a</TD
><TD CLASS="rdoc"
>the modifier to apply on the matching workspace
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l a</TD
><TD CLASS="rdoc"
>the base layout
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> (<A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l) l a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Specify a layout modifier to apply to a particular workspace; layouts
   on all other workspaces will remain unmodified.
</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:modWorkspaces"
><A NAME="v%3AmodWorkspaces"
></A
></A
><B
>modWorkspaces</B
></TD
><TD CLASS="declbut"
><A HREF="src/XMonad-Layout-PerWorkspace.html#modWorkspaces"
>Source</A
></TD
></TR
></TABLE
></TD
></TR
><TR
><TD CLASS="body"
><TABLE CLASS="vanilla" CELLSPACING="0" CELLPADDING="0"
><TR
><TD CLASS="arg"
>:: <A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3ALayoutClass"
>LayoutClass</A
> l a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="arg"
>=&gt; [<A HREF="/usr/share/doc/ghc/html/libraries/xmonad-0.9.1/XMonad-Core.html#t%3AWorkspaceId"
>WorkspaceId</A
>]</TD
><TD CLASS="rdoc"
>tags of the workspaces to match
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l a -&gt; <A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l a</TD
><TD CLASS="rdoc"
>the modifier to apply on the matching workspaces
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; l a</TD
><TD CLASS="rdoc"
>the base layout
</TD
></TR
><TR
><TD CLASS="arg"
>-&gt; <A HREF="XMonad-Layout-PerWorkspace.html#t%3APerWorkspace"
>PerWorkspace</A
> (<A HREF="XMonad-Layout-LayoutModifier.html#t%3AModifiedLayout"
>ModifiedLayout</A
> lm l) l a</TD
><TD CLASS="rdoc"
></TD
></TR
><TR
><TD CLASS="ndoc" COLSPAN="2"
>Specify a layout modifier to apply to a particular set of
   workspaces; layouts on all other workspaces will remain
   unmodified.
</TD
></TR
></TABLE
></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
>