diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-14 23:09:50 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | cd2c71097e0a878deada1337b58926fb9d7bc949 (patch) | |
| tree | 1d95cc48e15cef992dc0ef217b6dd64cc3572347 /src/Rahm/Desktop/Marking.hs | |
| parent | bc348f98dd736c146493fcdb44aeedce538b9167 (diff) | |
| download | rde-cd2c71097e0a878deada1337b58926fb9d7bc949.tar.gz rde-cd2c71097e0a878deada1337b58926fb9d7bc949.tar.bz2 rde-cd2c71097e0a878deada1337b58926fb9d7bc949.zip | |
Some changes to marking
Diffstat (limited to 'src/Rahm/Desktop/Marking.hs')
| -rw-r--r-- | src/Rahm/Desktop/Marking.hs | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Rahm/Desktop/Marking.hs b/src/Rahm/Desktop/Marking.hs index 1144ad7..98c96bb 100644 --- a/src/Rahm/Desktop/Marking.hs +++ b/src/Rahm/Desktop/Marking.hs @@ -2,7 +2,7 @@ module Rahm.Desktop.Marking ( historyNext, historyPrev, markCurrentWindow, pushHistory, jumpToMark, jumpToLast, swapWithLastMark, - swapWithMark + swapWithMark, markToWindow ) where import Rahm.Desktop.Windows (mapWindows, findWindow, getLocationWorkspace) @@ -185,6 +185,11 @@ swapWithLastMark = pushHistory $ withHistory $ \hist -> do windows $ swapWithFocused win Nothing -> return () +markToWindow :: Mark -> X (Maybe Window) +markToWindow m = do + MarkState { markStateMap = mp } <- XS.get + return $ Map.lookup m mp + swapWithMark :: Mark -> X () swapWithMark mark = pushHistory $ do MarkState {markStateMap = m} <- XS.get |