From 3cfa0ed22425b56f895abe2104643f8d83634566 Mon Sep 17 00:00:00 2001
From: Adam Vogt <vogt.adam@gmail.com>
Date: Tue, 7 Jun 2011 02:20:53 +0200
Subject: Export X.A.CycleWS.screenBy (issue 439)

Ignore-this: 2eaa2a852a3356f6163c4d38f72e730f

darcs-hash:20110607002053-1499c-8c5eee58c47415d9b8e5f60a9627dc788e8e92c8.gz
---
 XMonad/Actions/CycleWS.hs | 13 +++++++++++++
 1 file changed, 13 insertions(+)

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)
-- 
cgit v1.2.3