diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-04-01 00:26:28 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:46 -0600 |
| commit | a2e6b7617f67f16f9ede07a65d61ceb37adc4990 (patch) | |
| tree | 58d1f0f6996c4c38f0a011bb6829edd197a2d160 | |
| parent | 93723ba70f21b7dd3d8a6693571263f121f40d9b (diff) | |
| download | rde-a2e6b7617f67f16f9ede07a65d61ceb37adc4990.tar.gz rde-a2e6b7617f67f16f9ede07a65d61ceb37adc4990.tar.bz2 rde-a2e6b7617f67f16f9ede07a65d61ceb37adc4990.zip | |
Allow marks to be any alpha-numeric character, including unicode characters
| -rw-r--r-- | src/Internal/Keys.hs | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 1d3baf4..d340062 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -133,22 +133,19 @@ keymap = runKeys $ do bind xK_apostrophe $ do justMod $ doc "Jumps between marks." $ - subkeys $ do - bind xK_apostrophe $ - (noMod -|- justMod) $ - doc "Jumps to the last window." - jumpToLast - mapAlpha 0 jumpToMark + mapNextString $ \_ str -> + case str of + ['\''] -> jumpToLast + [ch] | isAlphaNum ch -> jumpToMark ch + _ -> return () shiftMod $ doc "Swap the current window with a mark." $ - subkeys $ do - bind xK_apostrophe $ - (noMod -|- shiftMod -|- rawMask shiftMask) $ - doc "Swap the current window with the last mark." - swapWithLastMark - - mapAlpha shiftMask swapWithMark + mapNextString $ \_ str -> + case str of + ['\''] -> swapWithLastMark + [ch] | isAlphaNum ch -> swapWithMark ch + _ -> return () bind xK_BackSpace $ do -- The only raw keybinding. Meant to get a terminal to unbrick XMonad if @@ -356,8 +353,10 @@ keymap = runKeys $ do bind xK_m $ do justMod $ doc "Mark the current window with the next typed character." $ - subkeys $ - mapAlpha 0 markCurrentWindow + mapNextString $ \_ str -> + case str of + [ch] | isAlphaNum ch -> markCurrentWindow ch + _ -> return () bind xK_n $ do justMod $ |