diff options
| author | Josh Rahm <rahm@google.com> | 2025-03-05 12:53:40 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2025-03-05 12:53:40 -0700 |
| commit | 215182bbb8f3cf8e92b56371e24e1bc45ab22f88 (patch) | |
| tree | 766799f8bf8f74d9410e646eecf212fa26a17198 /src/Rahm/Desktop/Workspaces.hs | |
| parent | 47a0e6e471074b3816b6542c9421abbe33e1d468 (diff) | |
| download | rde-215182bbb8f3cf8e92b56371e24e1bc45ab22f88.tar.gz rde-215182bbb8f3cf8e92b56371e24e1bc45ab22f88.tar.bz2 rde-215182bbb8f3cf8e92b56371e24e1bc45ab22f88.zip | |
Ability to move multiple windows at once.
Diffstat (limited to 'src/Rahm/Desktop/Workspaces.hs')
| -rw-r--r-- | src/Rahm/Desktop/Workspaces.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Rahm/Desktop/Workspaces.hs b/src/Rahm/Desktop/Workspaces.hs index 0c70591..49dcaae 100644 --- a/src/Rahm/Desktop/Workspaces.hs +++ b/src/Rahm/Desktop/Workspaces.hs @@ -24,7 +24,7 @@ where import Control.Arrow (Arrow ((&&&))) import Control.Monad.Trans (lift) import Control.Monad.Trans.Maybe (MaybeT (MaybeT)) -import Data.Char (isUpper, toLower, toUpper) +import Data.Char (isUpper, toLower, toUpper, chr, ord, isDigit) import Data.List (find, sort, sortBy, sortOn, (\\)) import Data.List.Safe ((!!)) import Data.Maybe (fromMaybe, mapMaybe) @@ -147,6 +147,11 @@ getScreensOnDifferentPlane ss = yCenter < y + fromIntegral h && yCenter > y accompaningWorkspace :: WorkspaceId -> WorkspaceId +accompaningWorkspace [s] + | isDigit s = show (fl (ord s - ord '0')) + where + fl x | even x = x + 1 + fl x = x - 1 accompaningWorkspace [s] = return $ if isUpper s |