aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-11-10 11:13:01 -0700
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:45 -0600
commitf4d1c466823c8a377b9bc8214bf7d586b6c03c6f (patch)
tree59ad8eaa97d38b04b076217d68cfbe9b03498a6c
parentb74311612b240c73eb60e3a5511bf111b1e8115e (diff)
downloadrde-f4d1c466823c8a377b9bc8214bf7d586b6c03c6f.tar.gz
rde-f4d1c466823c8a377b9bc8214bf7d586b6c03c6f.tar.bz2
rde-f4d1c466823c8a377b9bc8214bf7d586b6c03c6f.zip
Change the next-prev keybindings to cycle through only hidden workspaces.
This keeps the other monitors stable, which I prefer.
-rw-r--r--src/Internal/Lib.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/Internal/Lib.hs b/src/Internal/Lib.hs
index 3ba1eca..08ba2b7 100644
--- a/src/Internal/Lib.hs
+++ b/src/Internal/Lib.hs
@@ -35,6 +35,7 @@ instance XPrompt WinPrompt where
commandToComplete _ = id
data WorkspaceState = Current | Hidden | Visible
+ deriving (Ord, Eq, Enum)
-- Returns all the workspaces that are either visible, current or Hidden but
-- have windows and that workspace's state.
@@ -111,7 +112,7 @@ getString = runQuery $ do
relativeWorkspaceShift :: Selector -> X ()
relativeWorkspaceShift (Selector selector) = do
windows $ \ss ->
- let tags = sort $ (tag . snd <$> getPopulatedWorkspaces ss)
+ let tags = sort $ (tag . snd <$> filter (\x -> fst x /= Visible ) (getPopulatedWorkspaces ss))
from = tag $ workspace $ current ss
to = selector from tags
in greedyView to ss