diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2026-02-22 22:55:55 -0700 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2026-02-22 22:55:55 -0700 |
| commit | 983db9f0cd1d0e4e7e26f53554c6aa368fabef05 (patch) | |
| tree | eb44e65f9d834cd18cf73f8d9b4612f3e82e6caf /src/Rahm/Desktop/Keys | |
| parent | 7f36475e7c5c00da09e9d93f0664d9258e1e8274 (diff) | |
| download | rde-983db9f0cd1d0e4e7e26f53554c6aa368fabef05.tar.gz rde-983db9f0cd1d0e4e7e26f53554c6aa368fabef05.tar.bz2 rde-983db9f0cd1d0e4e7e26f53554c6aa368fabef05.zip | |
Diffstat (limited to 'src/Rahm/Desktop/Keys')
| -rw-r--r-- | src/Rahm/Desktop/Keys/Wml.hs | 41 |
1 files changed, 14 insertions, 27 deletions
diff --git a/src/Rahm/Desktop/Keys/Wml.hs b/src/Rahm/Desktop/Keys/Wml.hs index 19538fc..e5c45e7 100644 --- a/src/Rahm/Desktop/Keys/Wml.hs +++ b/src/Rahm/Desktop/Keys/Wml.hs @@ -480,11 +480,11 @@ readNextWorkspace = case key of (mask, keysym, _) | (Just macro) <- Map.lookup (mask, keysym) macros -> do - pushKeys macro - readNextWorkspace + pushKeys macro + readNextWorkspace (_, _, [ch]) | isAlphaNum ch || ch == '*' -> - return $ justWorkspace [ch] + return $ justWorkspace [ch] (_, _, "[") -> justWorkspace <$> ( lift1 (adjacentWorkspaceNotVisible prev) @@ -538,36 +538,23 @@ readNextWorkspace = floatWorkspace <$> readNextWorkspace -- Workspace to the next screen to the right of the next workspace. (_, _, ",") -> do - ws <- readNextWorkspace - screens <- - liftXToFeed $ - map (W.tag . W.workspace . snd) - <$> withWindowSet (return . getScreensOnSamePlane) + ws <- readNextWorkspaceName + liftXToFeed $ justWorkspace <$> getWorkspaceToTheRight ws - let (_, rest) = break ((== workspaceName ws) . Just) (screens ++ screens) - - justWorkspace <$> hoistMaybe (head $ tail rest) + -- Workspace on the screen below the current workspace.. + (_, _, "%") -> do + ws <- readNextWorkspaceName + liftXToFeed $ justWorkspace <$> getWorkspaceAbove ws -- Workspace on the screen above the current workspace.. (_, _, "+") -> do - screens <- - liftXToFeed $ - map (W.tag . W.workspace . snd) - <$> withWindowSet (return . getScreensOnDifferentPlane) - - justWorkspace <$> hoistMaybe (head screens) + ws <- readNextWorkspaceName + liftXToFeed $ justWorkspace <$> getWorkspaceAbove ws -- Workspace to the next screen to the left of the next workspace. (_, _, ";") -> do - ws <- readNextWorkspace - screens <- - liftXToFeed $ - map (W.tag . W.workspace . snd) - <$> withWindowSet (return . reverse . getHorizontallyOrderedScreens) - - let (_, rest) = break ((== workspaceName ws) . Just) (screens ++ screens) - - justWorkspace <$> hoistMaybe (head $ tail rest) + ws <- readNextWorkspaceName + liftXToFeed $ justWorkspace <$> getWorkspaceToTheLeft ws -- The workspace with the searched for window. (_, _, "/") -> @@ -695,7 +682,7 @@ readNextLocationSet' = -- Windows in a workspace (_, _, s) | s == "\t" || s == "@" || s == "\n" -> - (liftXToFeed . workspaceWindows) =<< readNextWorkspace + (liftXToFeed . workspaceWindows) =<< readNextWorkspace -- The first window in the next window set. (_, _, "!") -> (: []) <$> absorbMaybe (head <$> readNextLocationSet) -- The windows except the first in a window set. |