xmonad-contrib-0.7: Third party extensions for xmonadContentsIndex
XMonad.Actions.DynamicWorkspaces
Portabilityunportable
Stabilityunstable
MaintainerDavid Roundy <droundy@darcs.net>
Contents
Usage
Description
Provides bindings to add and delete workspaces. Note that you may only delete a workspace that is already empty.
Synopsis
addWorkspace :: String -> X ()
removeWorkspace :: X ()
withWorkspace :: XPConfig -> (String -> X ()) -> X ()
selectWorkspace :: XPConfig -> X ()
renameWorkspace :: XPConfig -> X ()
toNthWorkspace :: (String -> X ()) -> Int -> X ()
withNthWorkspace :: (String -> WindowSet -> WindowSet) -> Int -> X ()
Usage

You can use this module with the following in your ~/.xmonad/xmonad.hs file:

 import XMonad.Actions.DynamicWorkspaces

Then add keybindings like the following:

   , ((modMask x .|. shiftMask, xK_BackSpace), removeWorkspace)
   , ((modMask x .|. shiftMask, xK_v      ), selectWorkspace defaultXPConfig)
   , ((modMask x, xK_m                    ), withWorkspace defaultXPConfig (windows . W.shift))
   , ((modMask x .|. shiftMask, xK_m      ), withWorkspace defaultXPConfig (windows . copy))
   , ((modMask x .|. shiftMask, xK_r      ), renameWorkspace defaultXPConfig)
 -- mod-[1..9]       %! Switch to workspace N
 -- mod-shift-[1..9] %! Move client to workspace N
    ++
    zip (zip (repeat (modMask x)) [xK_1..xK_9]) (map (withNthWorkspace W.greedyView) [0..])
    ++
    zip (zip (repeat (modMask x .|. shiftMask)) [xK_1..xK_9]) (map (withNthWorkspace W.shift) [0..])

For detailed instructions on editing your key bindings, see XMonad.Doc.Extending#Editing_key_bindings.

addWorkspace :: String -> X ()
Add a new workspace with the given name.
removeWorkspace :: X ()
Remove the current workspace if it contains no windows.
withWorkspace :: XPConfig -> (String -> X ()) -> X ()
selectWorkspace :: XPConfig -> X ()
renameWorkspace :: XPConfig -> X ()
toNthWorkspace :: (String -> X ()) -> Int -> X ()
withNthWorkspace :: (String -> WindowSet -> WindowSet) -> Int -> X ()
Produced by Haddock version 0.8