diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2025-03-09 17:04:01 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2025-03-09 17:04:01 -0600 |
| commit | eaaeb8e37037a612cf9f078919004c5910eb2e5f (patch) | |
| tree | a6f0b00157d2667fb9de4f9b9617664e990bc68e /src/Rahm/Desktop/Keys.hs | |
| parent | 5f3510c05537b63739ef653b1d974738134ab3ef (diff) | |
| download | rde-eaaeb8e37037a612cf9f078919004c5910eb2e5f.tar.gz rde-eaaeb8e37037a612cf9f078919004c5910eb2e5f.tar.bz2 rde-eaaeb8e37037a612cf9f078919004c5910eb2e5f.zip | |
Change some of how Workspaces work in WML.
This change adds a "workspaceWindows" function on a pseudo-workspace
level so now the windowsets '@_', '@#', '@-' actually have meaning.
Also now the "move to workspace" function buffers the windows which
makes things more responsive and intuitive.
Diffstat (limited to 'src/Rahm/Desktop/Keys.hs')
| -rw-r--r-- | src/Rahm/Desktop/Keys.hs | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/Rahm/Desktop/Keys.hs b/src/Rahm/Desktop/Keys.hs index 4848998..6dceffd 100644 --- a/src/Rahm/Desktop/Keys.hs +++ b/src/Rahm/Desktop/Keys.hs @@ -705,7 +705,7 @@ bindings = do $ do stackset <- lift $ X.windowset <$> X.get selection <- mapMaybe locationWindow <$> runKeyFeed readNextLocationSet - withBorderColorM selectedWindowsColor selection $ do + (allMovements, finalSwap) <- withBorderColorM selectedWindowsColor selection $ do lift $ addStringToPendingBuffer " " ws <- runKeyFeed readNextWorkspace finalSwap <- @@ -717,9 +717,7 @@ bindings = do _ -> return id lift $ do - (Endo allMovements) <- - mconcat - <$> mapM (fmap Endo . moveWindowToWorkspaceFn ws) selection + allMovements <- moveWindowsToWorkspaceFn ws selection setAlternateWindows selection @@ -730,19 +728,21 @@ bindings = do setAlternateWorkspace win t ) (W.findTag win stackset) - - withWindowsUnpinned selection $ - windows $ - finalSwap - . ( \ss -> - case shiftType of - ShiftAndFollow - | (w : _) <- selection, - Just ws <- W.findTag w ss -> - W.greedyView ws ss - _ -> ss - ) - . allMovements + return (allMovements, finalSwap) + + lift $ + withWindowsUnpinned selection $ + windows $ + finalSwap + . ( \ss -> + case shiftType of + ShiftAndFollow + | (w : _) <- selection, + Just ws <- W.findTag w ss -> + W.greedyView ws ss + _ -> ss + ) + . allMovements altMod $ spawnX "sudo -A systemctl suspend && xsecurelock" |