| xmonad-contrib-0.8.1: Third party extensions for xmonad | Source code | Contents | Index

XMonad.Actions.DynamicWorkspaces

Portability | unportable
Stability | unstable
Maintainer | none

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 ()
addHiddenWorkspace :: String -> 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.

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.

withWorkspace :: XPConfig -> (String -> X ()) -> X () | Source

selectWorkspace :: XPConfig -> X () | Source

renameWorkspace :: XPConfig -> X () | Source

toNthWorkspace :: (String -> X ()) -> Int -> X () | Source

withNthWorkspace :: (String -> WindowSet -> WindowSet) -> Int -> X () | Source

Produced by Haddock version 2.4.2