aboutsummaryrefslogtreecommitdiff
path: root/src/Internal
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2021-11-10 11:13:01 -0700
committerJosh Rahm <rahm@google.com>2021-11-10 11:13:01 -0700
commit215d1d9f84dc3f9f5bdd1f87f340336bbf931bac (patch)
tree59ad8eaa97d38b04b076217d68cfbe9b03498a6c /src/Internal
parentebc4b4be4a5a361c2b4376ab2c1b92b052b61b8a (diff)
downloadrde-215d1d9f84dc3f9f5bdd1f87f340336bbf931bac.tar.gz
rde-215d1d9f84dc3f9f5bdd1f87f340336bbf931bac.tar.bz2
rde-215d1d9f84dc3f9f5bdd1f87f340336bbf931bac.zip
Change the next-prev keybindings to cycle through only hidden workspaces.
This keeps the other monitors stable, which I prefer.
Diffstat (limited to 'src/Internal')
-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