aboutsummaryrefslogtreecommitdiff
path: root/src/Rahm/Desktop/Keys
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2024-01-29 14:09:33 -0700
committerJosh Rahm <rahm@google.com>2024-01-29 14:09:33 -0700
commit12335234034a16fce3d324e92030963d3ceacbc1 (patch)
tree58e8a006b19f4d6ec095a6d2cc1429efd1c3680b /src/Rahm/Desktop/Keys
parentbbe7717e629b5a265c967652a946fa7563a747ff (diff)
downloadrde-12335234034a16fce3d324e92030963d3ceacbc1.tar.gz
rde-12335234034a16fce3d324e92030963d3ceacbc1.tar.bz2
rde-12335234034a16fce3d324e92030963d3ceacbc1.zip
Add <M-a> and <S-M-a> to cycle between monitors.
This is more general than it was before. It's quicker than typing its synonymous equivalent, <M-f>,. as a bonus it's the same on both dvorak and qwerty keyboards.
Diffstat (limited to 'src/Rahm/Desktop/Keys')
-rw-r--r--src/Rahm/Desktop/Keys/Wml.hs6
1 files changed, 3 insertions, 3 deletions
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.
(_, _, "/") ->