diff options
| author | Josh Rahm <joshuarahm@gmail.com> | 2022-04-01 00:26:28 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-04-01 00:26:28 -0600 |
| commit | f678f300731a1c90cc7985db15a6bf39c1ddd296 (patch) | |
| tree | 79997d760b2e4746efbb6bc7a13783865a39d1b5 | |
| parent | 1288720c83a1b38fa8d2a496e8cd11f368e8559d (diff) | |
| download | rde-doc.tar.gz rde-doc.tar.bz2 rde-doc.zip | |
Allow marks to be any alpha-numeric character, including unicode charactersdoc
| -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 24495ff..d5d319d 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -131,22 +131,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 @@ -323,8 +320,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 $ |