diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-18 10:11:05 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | 7f5b461a8dcd8844bb7918c6b9a7ee7d244c4d7c (patch) | |
| tree | e490e573a9f2ea384a5114b6118753d94a74e0d0 /src/Rahm/Desktop/Marking.hs | |
| parent | 6d633961451e1ab4747dcf1b5d3a6ea672d4d938 (diff) | |
| download | rde-7f5b461a8dcd8844bb7918c6b9a7ee7d244c4d7c.tar.gz rde-7f5b461a8dcd8844bb7918c6b9a7ee7d244c4d7c.tar.bz2 rde-7f5b461a8dcd8844bb7918c6b9a7ee7d244c4d7c.zip | |
Extend marking language to the mark command itself
Diffstat (limited to 'src/Rahm/Desktop/Marking.hs')
| -rw-r--r-- | src/Rahm/Desktop/Marking.hs | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Rahm/Desktop/Marking.hs b/src/Rahm/Desktop/Marking.hs index f4e0d9a..90808cf 100644 --- a/src/Rahm/Desktop/Marking.hs +++ b/src/Rahm/Desktop/Marking.hs @@ -7,6 +7,7 @@ module Rahm.Desktop.Marking ( setAlternateWorkspace, getAlternateWorkspace, getMarkedLocations, + markAllLocations, farLeftWindow, farRightWindow, windowLocation @@ -84,6 +85,13 @@ getAlternateWindows = alternateWindows <$> XS.get withMaybeFocused :: (Maybe Window -> X a) -> X a withMaybeFocused f = withWindowSet $ f . peek +markAllLocations :: Mark -> [Location] -> X () +markAllLocations mark locs = + XS.modify $ \m -> + m { + markStateMap = Map.insert mark locs (markStateMap m) + } + markCurrentWindow :: Mark -> X () markCurrentWindow mark = do ws <- getCurrentWorkspace |