xmonad-contrib-0.7: Third party extensions for xmonadContentsIndex
XMonad.Layout.PerWorkspace
Portabilityunportable
Stabilityunstable
Maintainer<byorgey@gmail.com>
Contents
Usage
Description
Configure layouts on a per-workspace basis: use layouts and apply layout modifiers selectively, depending on the workspace.
Synopsis
onWorkspace :: (LayoutClass l1 a, LayoutClass l2 a) => WorkspaceId -> l1 a -> l2 a -> PerWorkspace l1 l2 a
onWorkspaces :: (LayoutClass l1 a, LayoutClass l2 a) => [WorkspaceId] -> l1 a -> l2 a -> PerWorkspace l1 l2 a
modWorkspace :: LayoutClass l a => WorkspaceId -> (l a -> ModifiedLayout lm l a) -> l a -> PerWorkspace (ModifiedLayout lm l) l a
modWorkspaces :: LayoutClass l a => [WorkspaceId] -> (l a -> ModifiedLayout lm l a) -> l a -> PerWorkspace (ModifiedLayout lm l) l a
Usage

You can use this module by importing it into your ~/.xmonad/xmonad.hs file:

 import XMonad.Layout.PerWorkspace

and modifying your layoutHook as follows (for example):

 layoutHook = modWorkspace "baz" m1 $  -- apply layout modifier m1 to all layouts on workspace "baz"
              onWorkspace "foo" l1 $  -- layout l1 will be used on workspace "foo".
              onWorkspaces ["bar","6"] l2 $  -- layout l2 will be used on workspaces "bar" and "6".
              l3                      -- layout l3 will be used on all other workspaces.

Note that l1, l2, and l3 can be arbitrarily complicated layouts, e.g. (Full ||| smartBorders $ tabbed shrinkText defaultTConf ||| ...), and m1 can be any layout modifier, i.e. a function of type (l a -> ModifiedLayout lm l a).

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:

 layoutHook = A ||| B ||| onWorkspace "foo" D C
onWorkspace
:: (LayoutClass l1 a, LayoutClass l2 a)
=> WorkspaceIdthe tag of the workspace to match
-> l1 alayout to use on the matched workspace
-> l2 alayout to use everywhere else
-> PerWorkspace l1 l2 a
Specify one layout to use on a particular workspace, and another to use on all others. The second layout can be another call to onWorkspace, and so on.
onWorkspaces
:: (LayoutClass l1 a, LayoutClass l2 a)
=> [WorkspaceId]tags of workspaces to match
-> l1 alayout to use on matched workspaces
-> l2 alayout to use everywhere else
-> PerWorkspace l1 l2 a
Specify one layout to use on a particular set of workspaces, and another to use on all other workspaces.
modWorkspace
:: LayoutClass l a
=> WorkspaceIdtag of the workspace to match
-> (l a -> ModifiedLayout lm l a)the modifier to apply on the matching workspace
-> l athe base layout
-> PerWorkspace (ModifiedLayout lm l) l a
Specify a layout modifier to apply to a particular workspace; layouts on all other workspaces will remain unmodified.
modWorkspaces
:: LayoutClass l a
=> [WorkspaceId]tags of the workspaces to match
-> (l a -> ModifiedLayout lm l a)the modifier to apply on the matching workspaces
-> l athe base layout
-> PerWorkspace (ModifiedLayout lm l) l a
Specify a layout modifier to apply to a particular set of workspaces; layouts on all other workspaces will remain unmodified.
Produced by Haddock version 0.8