diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-08 11:42:15 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | 6678c04be3d2175714d200af506d0e3c7a2215c6 (patch) | |
| tree | f0840718f005b43f7a5778c4c6093d3c016ad4cb /src/Internal/Lib.hs | |
| parent | 31198b2e165f50aa48a99a6a181e68a0bd4ece34 (diff) | |
| download | rde-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.hs | 6 |
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 |