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 <joshuarahm@gmail.com>2022-10-09 12:19:46 -0600
commit6678c04be3d2175714d200af506d0e3c7a2215c6 (patch)
treef0840718f005b43f7a5778c4c6093d3c016ad4cb /src/Internal/Lib.hs
parent31198b2e165f50aa48a99a6a181e68a0bd4ece34 (diff)
downloadrde-6678c04be3d2175714d200af506d0e3c7a2215c6.tar.gz
rde-6678c04be3d2175714d200af506d0e3c7a2215c6.tar.bz2
rde-6678c04be3d2175714d200af506d0e3c7a2215c6.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