From 9127725fd496be2db5ab1826d8585a8cf43f7d5a Mon Sep 17 00:00:00 2001 From: Josh Rahm Date: Fri, 8 Apr 2022 11:42:15 -0600 Subject: Add more bindings to the "g" command. --- src/Internal/Lib.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Internal/Lib.hs') diff --git a/src/Internal/Lib.hs b/src/Internal/Lib.hs index c29ca31..3ba858f 100644 --- a/src/Internal/Lib.hs +++ b/src/Internal/Lib.hs @@ -121,13 +121,13 @@ getString = runQuery $ do then t else printf "%s - %s" t a -relativeWorkspaceShift :: Selector -> X () -relativeWorkspaceShift (Selector selector) = do +withRelativeWorkspace :: Selector -> (WorkspaceId -> WindowSet -> WindowSet) -> X () +withRelativeWorkspace (Selector selector) fn = windows $ \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 + in fn to ss next :: Selector next = Selector $ \a l -> select a l l -- cgit