diff options
| author | Josh Rahm <rahm@google.com> | 2022-04-04 17:21:16 -0600 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2022-04-04 17:21:16 -0600 |
| commit | 9b5a7b99d33891f0bc664316c643337ac638cbae (patch) | |
| tree | aa1501058bd5c786b97dc868c6fc1e44d3b447cb /src/Internal/Keys.hs | |
| parent | c194a9be4e43bc4514070d172024fcf3354fb662 (diff) | |
| download | rde-9b5a7b99d33891f0bc664316c643337ac638cbae.tar.gz rde-9b5a7b99d33891f0bc664316c643337ac638cbae.tar.bz2 rde-9b5a7b99d33891f0bc664316c643337ac638cbae.zip | |
Implement a window history system.
This lets the user cycle between past windows. The rules for when a
window gets added to the history is the same as when a window is
considered the last marked.
In fact, now all the last mark does is swap the current window with the
previous one in the history.
Diffstat (limited to 'src/Internal/Keys.hs')
| -rw-r--r-- | src/Internal/Keys.hs | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 6d34c4a..2dd7c37 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -290,11 +290,17 @@ keymap = runKeys $ do doc "Shrink the size of the zoom region" $ sendMessage ShrinkZoom + shiftMod $ + doc "Go to the previous window in history." historyPrev + bind xK_k $ do justMod $ doc "Expand the size of the zoom region" $ sendMessage ExpandZoom + shiftMod $ + doc "Go to the next window in history." historyNext + bind xK_l $ do justMod $ doc "Focus the next window in the stack" $ @@ -420,18 +426,19 @@ keymap = runKeys $ do _ -> return () bind xK_p $ do - (justMod -|- noMod) $ mapNextString $ \_ str -> - spawnX $ printf "gxmessage 'typed: \"%s\"\ncodes: \"%s\"\nunicode: รก\n'" - str - (show (map ord str)) + (justMod -|- noMod) $ + doc "Go to the prior window in the history" historyPrev bind xK_t $ do (justMod -|- noMod) $ logs "Test Log" + -- bind xK_n $ do + -- (justMod -|- noMod) $ + -- doc "Take a note" $ + -- spawnX (terminal config ++ " -t Notes -e notes new") bind xK_n $ do (justMod -|- noMod) $ - doc "Take a note" $ - spawnX (terminal config ++ " -t Notes -e notes new") + doc "Go to the next window in the history" historyNext bind xK_c $ do shiftMod $ @@ -589,8 +596,8 @@ mouseMap = runButtons $ do (button4, increaseVolume), (button5, decreaseVolume), (button2, playPause), - (button9, mediaNext), - (button8, mediaPrev), + (button9, historyNext), + (button8, historyPrev), (button6, mediaPrev), (button7, mediaNext) ] |