Copyright | (c) 2012 kedals0 |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | Dal <kedasl0@gmail.com> |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
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.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 the tutorial.
configWorkscreen :: [Workscreen] -> X () Source #
Initial configuration of workscreens
viewWorkscreen :: WorkscreenId -> X () Source #
View workscreen of index WorkscreenId
. If current workscreen is asked
workscreen, workscreen's workspaces are shifted.
data Workscreen Source #
Workscreen | |
|
Instances
Show Workscreen Source # | |
Defined in XMonad.Actions.Workscreen showsPrec :: Int -> Workscreen -> ShowS # show :: Workscreen -> String # showList :: [Workscreen] -> ShowS # |
shiftToWorkscreen :: WorkscreenId -> X () Source #
Shift a window on the first workspace of workscreen
WorkscreenId
.
fromWorkspace :: Int -> [WorkspaceId] -> [Workscreen] Source #
Create workscreen list from workspace list. Group workspaces to packets of screens number size.
expandWorkspace :: Int -> [WorkspaceId] -> [WorkspaceId] Source #
Helper to group workspaces. Multiply workspace by screens number.
type WorkscreenId = Int Source #