diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-04-15 23:55:35 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | 9e5d56cfb2508d9f5e58bf681265d0f1070b3f35 (patch) | |
| tree | 7b8ed1b605636fb67b11999bad5e45d48d08f90b /src/Rahm/Desktop/Lib.hs | |
| parent | 73fe77966c249283655495e144de3c36c25e533d (diff) | |
| download | rde-9e5d56cfb2508d9f5e58bf681265d0f1070b3f35.tar.gz rde-9e5d56cfb2508d9f5e58bf681265d0f1070b3f35.tar.bz2 rde-9e5d56cfb2508d9f5e58bf681265d0f1070b3f35.zip | |
Make history much, much more reliable.
This time history is being done using a hook to keep track of history.
This means I don't have to manually call pushHistory every time I focus
a new window.
Diffstat (limited to 'src/Rahm/Desktop/Lib.hs')
| -rw-r--r-- | src/Rahm/Desktop/Lib.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Rahm/Desktop/Lib.hs b/src/Rahm/Desktop/Lib.hs index 3b4ee9c..c7cfca4 100644 --- a/src/Rahm/Desktop/Lib.hs +++ b/src/Rahm/Desktop/Lib.hs @@ -48,14 +48,14 @@ getString = runQuery $ do else printf "%s - %s" t a askWindowId :: X (Maybe Window) -askWindowId = pushHistory $ do +askWindowId = do windowTitlesToWinId <- withWindowSet $ \ss -> Map.fromList <$> mapM (\wid -> (,) <$> getString wid <*> return wid) (allWindows ss) runDMenuPromptWithMap "Window" (Just "#f542f5") windowTitlesToWinId windowJump :: X () -windowJump = pushHistory $ do +windowJump = do windowId <- askWindowId case windowId of |