aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Keys.hs
diff options
context:
space:
mode:
authorJosh Rahm <rahm@google.com>2022-04-04 17:21:16 -0600
committerJosh Rahm <joshuarahm@gmail.com>2022-10-09 12:19:46 -0600
commit67685752a1b3f9c29556b5c033c29e9736378f0b (patch)
tree171a3acb7430699fe5867f2b3f525787102e6da8 /src/Internal/Keys.hs
parentfcb81c33239a63d88b8ae0005008296135a1721c (diff)
downloadrde-67685752a1b3f9c29556b5c033c29e9736378f0b.tar.gz
rde-67685752a1b3f9c29556b5c033c29e9736378f0b.tar.bz2
rde-67685752a1b3f9c29556b5c033c29e9736378f0b.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.hs23
1 files changed, 15 insertions, 8 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs
index 961bfc5..3f9882b 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)
]