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.
|