diff options
author | Adam Vogt <vogt.adam@gmail.com> | 2011-06-07 02:20:53 +0200 |
---|---|---|
committer | Adam Vogt <vogt.adam@gmail.com> | 2011-06-07 02:20:53 +0200 |
commit | 3cfa0ed22425b56f895abe2104643f8d83634566 (patch) | |
tree | 65c44ffcdc977b411bdd78d794c4a3b1635760fb /XMonad | |
parent | 62b9b99b7280d52b4203582ab4ce31b45982140b (diff) | |
download | XMonadContrib-3cfa0ed22425b56f895abe2104643f8d83634566.tar.gz XMonadContrib-3cfa0ed22425b56f895abe2104643f8d83634566.tar.xz XMonadContrib-3cfa0ed22425b56f895abe2104643f8d83634566.zip |
Export X.A.CycleWS.screenBy (issue 439)
Ignore-this: 2eaa2a852a3356f6163c4d38f72e730f
darcs-hash:20110607002053-1499c-8c5eee58c47415d9b8e5f60a9627dc788e8e92c8.gz
Diffstat (limited to 'XMonad')
-rw-r--r-- | XMonad/Actions/CycleWS.hs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/XMonad/Actions/CycleWS.hs b/XMonad/Actions/CycleWS.hs index ded028e..73923f6 100644 --- a/XMonad/Actions/CycleWS.hs +++ b/XMonad/Actions/CycleWS.hs @@ -73,6 +73,8 @@ module XMonad.Actions.CycleWS ( , toggleOrDoSkip , skipTags + , screenBy + ) where import Control.Monad ( unless ) @@ -313,6 +315,17 @@ switchScreen d = do s <- screenBy d Nothing -> return () 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 d = do ws <- gets windowset --let ss = sortBy screen (screens ws) |