Copyright | (c) 2017 Ivan Malison |
---|---|
License | BSD3-style (see LICENSE) |
Maintainer | IvanMalison@gmail.com |
Stability | unstable |
Portability | unportable |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Cycle through previously viewed workspaces in the order they were viewed most recently on the screen where cycling is taking place.
Synopsis
- cycleWorkspaceOnScreen :: ScreenId -> [KeySym] -> KeySym -> KeySym -> X ()
- cycleWorkspaceOnCurrentScreen :: [KeySym] -> KeySym -> KeySym -> X ()
- handleKeyEvent :: EventType -> KeySym -> X () -> EventType -> KeySym -> Maybe (X ())
- repeatableAction :: [KeySym] -> KeySym -> (EventType -> KeySym -> X ()) -> X ()
Usage
To use this module, first import it as well as XMonad.Hooks.WorkspaceHistory:
import XMonad.Hooks.WorkspaceHistory (workspaceHistoryHook) import XMonad.Actions.CycleWorkspaceByScreen
Then add workspaceHistoryHook
to your logHook
like this:
main :: IO () main = xmonad $ def { ... , logHook = workspaceHistoryHook >> ... }
Finally, define a new keybinding for cycling (seen) workspaces per screen:
, ((mod4Mask, xK_slash), cycleWorkspaceOnCurrentScreen [xK_Super_L] xK_slash xK_p)
cycleWorkspaceOnScreen Source #
:: ScreenId | The screen to cycle on. |
-> [KeySym] | A list of modifier keys used when invoking this action; as soon as one of them is released, the final switch is made. |
-> KeySym | Key used to switch to next workspace. |
-> KeySym | Key used to switch to previous workspace. |
-> X () |
Like cycleRecentWS
, but only cycle
through the most recent workspaces on the given screen.
cycleWorkspaceOnCurrentScreen :: [KeySym] -> KeySym -> KeySym -> X () Source #
Like cycleWorkspaceOnScreen
, but supply the currently focused
screen as the screenId
.