Copyright | (c) Jan-David Quesel <quesel@gmail.org> |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | none |
Stability | unstable |
Portability | unportable |
Safe Haskell | None |
Language | Haskell2010 |
Provides bindings to add and delete links between workspaces. It is aimed at providing useful links between workspaces in a multihead setup. Linked workspaces are view at the same time.
Synopsis
- switchWS :: (WorkspaceId -> X ()) -> MessageConfig -> WorkspaceId -> X ()
- removeAllMatchings :: MessageConfig -> X ()
- unMatch :: WorkspaceId -> X ()
- toggleLinkWorkspaces :: MessageConfig -> X ()
- defaultMessageConf :: MessageConfig
- data MessageConfig = MessageConfig {
- messageFunction :: ScreenId -> [Char] -> [Char] -> [Char] -> X ()
- foreground :: [Char]
- alertedForeground :: [Char]
- background :: [Char]
Usage
You can use this module with the following in your ~/.xmonad/xmonad.hs
file:
import XMonad.Actions.LinkWorkspaces
and add a function to print messages like
message_command (S screen) = " dzen2 -p 1 -w 300 -xs " ++ show (screen + 1) message_color_func c1 c2 msg = dzenColor c1 c2 msg message screen c1 c2 msg = spawn $ "echo '" ++ (message_color_func c1 c2 msg) ++ "' | " ++ message_command screen
alternatively you can use the noMessages function as the argument
Then add keybindings like the following:
,((modm, xK_p), toggleLinkWorkspaces message) ,((modm .|. shiftMask, xK_p), removeAllMatchings message)
[ ((modm .|. m, k), a i) | (a, m) <- [(switchWS (\y -> windows $ view y) message, 0),(switchWS (\x -> windows $ shift x . view x) message, shiftMask)] , (i, k) <- zip (XMonad.workspaces conf) [xK_1 .. xK_9]]
For detailed instructions on editing your key bindings, see XMonad.Doc.Extending.
switchWS :: (WorkspaceId -> X ()) -> MessageConfig -> WorkspaceId -> X () Source #
removeAllMatchings :: MessageConfig -> X () Source #
Remove all maps between workspaces
unMatch :: WorkspaceId -> X () Source #
remove all matching regarding a given workspace
toggleLinkWorkspaces :: MessageConfig -> X () Source #
Toggle the currently displayed workspaces as matching. Starting from the one with focus | a linked list of workspaces is created that will later be iterated by switchToMatching.
data MessageConfig Source #
MessageConfig | |
|