XMonad.Actions.DynamicWorkspaceGroups

xmonad-contrib-0.18.1: Community-maintained extensions for xmonad

Copyright | (c) Brent Yorgey 2009
License | BSD-style (see LICENSE)
Maintainer | <byorgey@gmail.com>
Stability | experimental
Portability | unportable
Safe Haskell | None
Language | Haskell2010

XMonad.Actions.DynamicWorkspaceGroups

Contents

- Usage
- TopicSpace Integration

Description

Dynamically manage "workspace groups", sets of workspaces being used together for some common task or purpose, to allow switching between workspace groups in a single action. Note that this only makes sense for multi-head setups.

Synopsis

- type WSGroupId = String
- addRawWSGroup :: WSGroupId -> [(ScreenId, WorkspaceId)] -> X ()
- addWSGroup :: WSGroupId -> [WorkspaceId] -> X ()
- addCurrentWSGroup :: WSGroupId -> X ()
- forgetWSGroup :: WSGroupId -> X ()
- viewWSGroup :: WSGroupId -> X ()
- promptWSGroupView :: XPConfig -> String -> X ()
- promptWSGroupAdd :: XPConfig -> String -> X ()
- promptWSGroupForget :: XPConfig -> String -> X ()
- data WSGPrompt
- viewTopicGroup :: TopicConfig -> WSGroupId -> X ()
- promptTopicGroupView :: TopicConfig -> XPConfig -> String -> X ()

# Usage

You can use this module by importing it into your `xmonad.hs` file:

    import XMonad.Actions.DynamicWorkspaceGroups

Then add keybindings like the following (this example uses XMonad.Util.EZConfig-style keybindings, but this is not necessary):

       , ("M-y n", promptWSGroupAdd myXPConfig "Name this group: ")
       , ("M-y g", promptWSGroupView myXPConfig "Go to group: ")
       , ("M-y d", promptWSGroupForget myXPConfig "Forget group: ")

type WSGroupId = String #

addRawWSGroup :: WSGroupId -> [(ScreenId, WorkspaceId)] -> X () #

Add a new workspace group of the given name, mapping to an explicitly specified association between screen IDs and workspace names. This function could be useful for, say, creating some standard workspace groups in your startup hook.

addWSGroup :: WSGroupId -> [WorkspaceId] -> X () #

Add a new workspace group with the given name.

addCurrentWSGroup :: WSGroupId -> X () #

Give a name to the current workspace group.

forgetWSGroup :: WSGroupId -> X () #

Delete the named workspace group from the list of workspace groups. Note that this has no effect on the workspaces involved; it simply forgets the given name.

viewWSGroup :: WSGroupId -> X () #

View the workspace group with the given name.

promptWSGroupView :: XPConfig -> String -> X () #

Prompt for a workspace group to view.

promptWSGroupAdd :: XPConfig -> String -> X () #

Prompt for a name for the current workspace group.

promptWSGroupForget :: XPConfig -> String -> X () #

Prompt for a workspace group to forget.

data WSGPrompt #

#### Instances

Instances details

XPrompt WSGPrompt # |
Instance details Defined in XMonad.Actions.DynamicWorkspaceGroups Methods showXPrompt :: WSGPrompt -> String # nextCompletion :: WSGPrompt -> String -> [String] -> String # commandToComplete :: WSGPrompt -> String -> String # completionToCommand :: WSGPrompt -> String -> String # completionFunction :: WSGPrompt -> ComplFunction # modeAction :: WSGPrompt -> String -> String -> X () #

# TopicSpace Integration

You can use this module with XMonad.Actions.TopicSpace — just replace `promptWSGroupView` with `promptTopicGroupView`:

       , ("M-y n", promptWSGroupAdd myXPConfig "Name this group: ")
       , ("M-y g", promptTopicGroupView myTopicConfig myXPConfig "Go to group: ")
       , ("M-y d", promptWSGroupForget myXPConfig "Forget group: ")

It's also a good idea to replace `spawn` with `spawnOn` or `spawnHere` in your topic actions, so everything is spawned where it should be.

viewTopicGroup :: TopicConfig -> WSGroupId -> X () #

View the workspace group with the given name, treating the workspaces as topics.

promptTopicGroupView :: TopicConfig -> XPConfig -> String -> X () #

Prompt for a workspace group to view, treating the workspaces as topics.