aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Rahm/Desktop/Keys/Wml.hs19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/Rahm/Desktop/Keys/Wml.hs b/src/Rahm/Desktop/Keys/Wml.hs
index af04e44..adb1d9f 100644
--- a/src/Rahm/Desktop/Keys/Wml.hs
+++ b/src/Rahm/Desktop/Keys/Wml.hs
@@ -273,8 +273,27 @@ readNextWorkspace =
justWorkspace . accompaningWorkspace <$> readNextWorkspaceName
(_, _, " ") -> mt $
justWorkspace . accompaningWorkspace <$> getCurrentWorkspace
+ (_, _, "~") -> do
+ ws <- readNextWorkspace
+ case workspaceName ws of
+ Just [a] | isAlphaNum a ->
+ return (justWorkspace $ accompaningWorkspace [a])
+ _ -> MaybeT (return Nothing)
+
(_, _, "_") -> return blackHoleWorkspace
(_, _, "-") -> return alternateWorkspace
+ (_, _, "=") -> do
+ ws1 <- readNextWorkspace
+ ws2 <- readNextWorkspace
+
+ ws3 <- readNextWorkspace
+ ws4 <- readNextWorkspace
+
+ return $
+ if workspaceName ws1 == workspaceName ws2
+ then ws3
+ else ws4
+
(mask, keysym, _) -> do
macro <- (MaybeT . fromX) (Map.lookup (mask, keysym) . workspaceMacros <$> XS.get)
fromMaybeTX $ workspaceForKeysT macro