diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 17 | ||||
| -rw-r--r-- | src/Rahm/Desktop/Keys/Wml.hs | 6 |
2 files changed, 20 insertions, 3 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index b84a586..d55c3bc 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -154,6 +154,7 @@ import XMonad.Layout.Spacing import XMonad.Util.Run (safeSpawn) import XMonad.Util.WindowProperties import Prelude hiding ((!!)) +import Graphics.X11.XScreenSaver (XScreenSaverState(ScreenSaverCycle)) type KeyMap l = XConfig l -> Map (KeyMask, KeySym) (X ()) @@ -373,6 +374,22 @@ bindings = do ws <- readNextWorkspaceName lift $ windows $ W.view ws + bind xK_a $ do + justMod $ + doc "Cycle focus forward through the screens. (Synonymous with f,.)" $ do + runMaybeT_ $ do + ws' <- workspaceForStringT ",." + ws <- MaybeT . return $ workspaceName ws' + lift $ windows $ W.view ws + + shiftMod $ + doc "Cycle focus backward through the screens. (Synonymous with f;.)" $ do + runMaybeT_ $ do + ws' <- workspaceForStringT ";." + ws <- MaybeT . return $ workspaceName ws' + lift $ windows $ W.view ws + + bind xK_g $ do justMod $ doc diff --git a/src/Rahm/Desktop/Keys/Wml.hs b/src/Rahm/Desktop/Keys/Wml.hs index 61c19b2..675d56e 100644 --- a/src/Rahm/Desktop/Keys/Wml.hs +++ b/src/Rahm/Desktop/Keys/Wml.hs @@ -562,11 +562,11 @@ readNextWorkspaceWithHandler handle = screens <- mt $ map (W.tag . W.workspace . snd) - <$> withWindowSet (return . getHorizontallyOrderedScreens) + <$> withWindowSet (return . reverse . getHorizontallyOrderedScreens) - let (front, _) = break ((== workspaceName ws) . Just) (screens ++ screens) + let (_, rest) = break ((== workspaceName ws) . Just) (screens ++ screens) - justWorkspace <$> MaybeT (return $ last front) + justWorkspace <$> MaybeT (return $ head $ tail rest) -- The workspace with the searched for window. (_, _, "/") -> |