From f4d1c466823c8a377b9bc8214bf7d586b6c03c6f Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Wed, 10 Nov 2021 11:13:01 -0700 Subject: Change the next-prev keybindings to cycle through only hidden workspaces. This keeps the other monitors stable, which I prefer. --- src/Internal/Lib.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit