xmonad-contrib-0.13: Third party extensions for xmonad

Copyright | (c) 2012 kedals0
License | BSD3-style (see LICENSE)
Maintainer | Dal <kedasl0@gmail.com>
Stability | unstable
Portability | unportable
Safe Haskell | None
Language | Haskell98

XMonad.Actions.Workscreen

Contents

- Usage

Description

A workscreen permits to display a set of workspaces on several screens. In xinerama mode, when a workscreen is viewed, workspaces associated to all screens are visible.

The first workspace of a workscreen is displayed on first screen, second on second screen, etc. Workspace position can be easily changed. If the current workscreen is called again, workspaces are shifted.

This also permits to see all workspaces of a workscreen even if just one screen is present, and to move windows from workspace to workscreen.

Synopsis

- configWorkscreen :: [Workscreen] -> X ()
- viewWorkscreen :: WorkscreenId -> X ()
- data Workscreen = Workscreen {
  - workscreenId :: Int
  - workspaces :: [WorkspaceId]
  }
- shiftToWorkscreen :: WorkscreenId -> X ()
- fromWorkspace :: Int -> [WorkspaceId] -> [Workscreen]
- expandWorkspace :: Int -> [WorkspaceId] -> [WorkspaceId]
- type WorkscreenId = Int

# Usage

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

    import XMonad.Actions.Workscreen
    myWorkspaces = let myOldWorkspaces = ["adm","work","mail"]
                   in Workscreen.expandWorkspace 2 myOldWorkspaces
    myStartupHook = do Workscreen.configWorkscreen (Workscreen.fromWorkspace 2 myWorkspaces)
                       return ()

Then, replace normal workspace view and shift keybinding:

    [((m .|. modm, k), f i)
         | (i, k) <- zip [0..] [1..12]
         , (f, m) <- [(Workscreen.viewWorkscreen, 0), (Workscreen.shiftToWorkscreen, shiftMask)]]

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

configWorkscreen :: [Workscreen] -> X () #

Initial configuration of workscreens

viewWorkscreen :: WorkscreenId -> X () #

View workscreen of index `WorkscreenId`. If current workscreen is asked workscreen, workscreen's workspaces are shifted.

data Workscreen #

Constructors

Workscreen |
Fields workscreenId :: Int workspaces :: [WorkspaceId]

Instances

Show Workscreen # |
Methods showsPrec :: Int -> Workscreen -> ShowS # show :: Workscreen -> String # showList :: [Workscreen] -> ShowS #

shiftToWorkscreen :: WorkscreenId -> X () #

Shift a window on the first workspace of workscreen `WorkscreenId`.

fromWorkspace :: Int -> [WorkspaceId] -> [Workscreen] #

Create workscreen list from workspace list. Group workspaces to packets of screens number size.

expandWorkspace :: Int -> [WorkspaceId] -> [WorkspaceId] #

Helper to group workspaces. Multiply workspace by screens number.

type WorkscreenId = Int #