aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Rahm/Desktop/Keys/Wml.hs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/Rahm/Desktop/Keys/Wml.hs b/src/Rahm/Desktop/Keys/Wml.hs
index 9074b66..34dabd2 100644
--- a/src/Rahm/Desktop/Keys/Wml.hs
+++ b/src/Rahm/Desktop/Keys/Wml.hs
@@ -214,6 +214,8 @@ readNextWorkspace :: (KeyFeeder m) => MaybeT m Workspace
readNextWorkspace =
readNextKey $ \mask sym str ->
case (mask, sym, str) of
+ (_, e, _) | e == xK_Escape -> MaybeT $ return Nothing
+
(_, _, [ch]) | isAlphaNum ch || ch == '*' -> return $ justWorkspace [ch]
(_, _, "[") ->
justWorkspace <$>
@@ -291,14 +293,14 @@ readNextWorkspace =
then ws3
else ws4
- -- ?&s@.'@s
-
(_, _, "?") -> do
l1 <- readNextLocationSet
ws1 <- readNextWorkspace
ws2 <- readNextWorkspace
+ mt $ logs Trace "If not empty %s then %s else %s" (show l1) (show $ workspaceName ws1) (show $ workspaceName ws2)
+
return $
if null l1
then ws2
@@ -315,6 +317,8 @@ readNextLocationSet :: (KeyFeeder m) => MaybeT m [Location]
readNextLocationSet =
readNextKey $ \mask sym str ->
case (mask, sym, str) of
+ (_, e, _) | e == xK_Escape -> MaybeT $ return Nothing
+
(_, _, [ch]) | isAlpha ch -> mt $ getMarkedLocations [ch]
(_, _, "0") -> (:[]) <$> MaybeT (fromX getMostRecentLocationInHistory)
(_, _, [ch]) | isDigit ch ->