xmonad-contrib-0.9.1: Third party extensions for xmonad

Portabilityunportable
Stabilityunstable
Maintainernone

XMonad.Actions.DynamicWorkspaces

Contents

Description

Provides bindings to add and delete workspaces. Note that you may only delete a workspace that is already empty.

Synopsis

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:

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

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

addWorkspace :: String -> X ()Source

Add a new workspace with the given name.

removeWorkspace :: X ()Source

Remove the current workspace if it contains no windows.

addHiddenWorkspace :: String -> X ()Source

Add a new hidden workspace with the given name.