xmonad-contrib-0.10: Third party extensions for xmonad

MaintainerTomas Janousek <tomi@nomi.cz>




Provides bindings to rename workspaces, show these names in DynamicLog and swap workspaces along with their names. These names survive restart. Together with XMonad.Layout.WorkspaceDir this provides for a fully dynamic topic space workflow.



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

 import XMonad.Actions.WorkspaceNames

Then add keybindings like the following:

   , ((modm .|. shiftMask, xK_r      ), renameWorkspace defaultXPConfig)

and apply workspaceNamesPP to your DynamicLog pretty-printer:

 myLogHook =
     workspaceNamesPP xmobarPP >>= dynamicLogString >>= xmonadPropLog

We also provide a modification of XMonad.Actions.SwapWorkspaces's functionality, which may be used this way:

   , ((modMask .|. shiftMask, xK_Left  ), swapTo Prev)
   , ((modMask .|. shiftMask, xK_Right ), swapTo Next)
 [((modm .|. controlMask, k), swapWithCurrent i)
     | (i, k) <- zip workspaces [xK_1 ..]]

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

Workspace naming

renameWorkspace :: XPConfig -> X ()Source

Prompt for a new name for the current workspace and set it.

workspaceNamesPP :: PP -> X PPSource

Modify XMonad.Hooks.DynamicLog's pretty-printing format to show workspace names as well.

getWorkspaceNames :: X (WorkspaceId -> String)Source

Returns a function that maps workspace tag "t" to "t:name" for workspaces with a name, and to "t" otherwise.

setWorkspaceName :: WorkspaceId -> String -> X ()Source

Sets the name of a workspace. Empty string makes the workspace unnamed again.

setCurrentWorkspaceName :: String -> X ()Source

Sets the name of the current workspace. See setWorkspaceName.

Workspace swapping

swapTo :: Direction1D -> X ()Source

See XMonad.Actions.SwapWorkspaces.swapTo. This is the same with names.

swapTo' :: Direction1D -> WSType -> X ()Source

Swap with the previous or next workspace of the given type.

swapWithCurrent :: WorkspaceId -> X ()Source

See XMonad.Actions.SwapWorkspaces.swapWithCurrent. This is almost the same with names.