aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Lib.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-04-08 11:42:15 -0600
committerJosh Rahm <rahm@google.com>2022-04-08 11:42:15 -0600
commit9127725fd496be2db5ab1826d8585a8cf43f7d5a (patch)
treef0840718f005b43f7a5778c4c6093d3c016ad4cb /src/Internal/Lib.hs
parent5d686c481e8bc1734f822b64792c390aab65f64e (diff)
downloadrde-9127725fd496be2db5ab1826d8585a8cf43f7d5a.tar.gz
rde-9127725fd496be2db5ab1826d8585a8cf43f7d5a.tar.bz2
rde-9127725fd496be2db5ab1826d8585a8cf43f7d5a.zip
Add more bindings to the "g" command.
Diffstat (limited to 'src/Internal/Lib.hs')
-rw-r--r--src/Internal/Lib.hs6
1 files changed, 3 insertions, 3 deletions
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