mirror of
https://github.com/xmonad/xmonad-contrib.git
synced 2025-05-19 11:30:22 -07:00
Export X.A.CycleWS.screenBy (issue 439)
This commit is contained in:
parent
d752141be1
commit
ff41d7dc68
@ -73,6 +73,8 @@ module XMonad.Actions.CycleWS (
|
|||||||
, toggleOrDoSkip
|
, toggleOrDoSkip
|
||||||
, skipTags
|
, skipTags
|
||||||
|
|
||||||
|
, screenBy
|
||||||
|
|
||||||
) where
|
) where
|
||||||
|
|
||||||
import Control.Monad ( unless )
|
import Control.Monad ( unless )
|
||||||
@ -313,6 +315,17 @@ switchScreen d = do s <- screenBy d
|
|||||||
Nothing -> return ()
|
Nothing -> return ()
|
||||||
Just ws -> windows (view ws)
|
Just ws -> windows (view ws)
|
||||||
|
|
||||||
|
{- | Get the 'ScreenId' /d/ places over. Example usage is a variation of the
|
||||||
|
the default screen keybindings:
|
||||||
|
|
||||||
|
> -- mod-{w,e}, Switch to previous/next Xinerama screen
|
||||||
|
> -- mod-shift-{w,e}, Move client to previous/next Xinerama screen
|
||||||
|
> --
|
||||||
|
> [((m .|. modm, key), sc >>= screenWorkspace >>= flip whenJust (windows . f))
|
||||||
|
> | (key, sc) <- zip [xK_w, xK_e] [(screenBy (-1)),(screenBy 1)]
|
||||||
|
> , (f, m) <- [(W.view, 0), (W.shift, shiftMask)]]
|
||||||
|
|
||||||
|
-}
|
||||||
screenBy :: Int -> X (ScreenId)
|
screenBy :: Int -> X (ScreenId)
|
||||||
screenBy d = do ws <- gets windowset
|
screenBy d = do ws <- gets windowset
|
||||||
--let ss = sortBy screen (screens ws)
|
--let ss = sortBy screen (screens ws)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user