aboutsummaryrefslogtreecommitdiff
path: root/src/Internal/Keys.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Internal/Keys.hs')
-rw-r--r--src/Internal/Keys.hs42
1 files changed, 32 insertions, 10 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs
index 0dd8760..89e2cf1 100644
--- a/src/Internal/Keys.hs
+++ b/src/Internal/Keys.hs
@@ -25,7 +25,7 @@ import Internal.PromptConfig
import System.IO
import Text.Printf
import XMonad
-import XMonad.Actions.Submap
+import Internal.Submap
import XMonad.Actions.WindowNavigation
import XMonad.Prompt
import XMonad.Prompt.Input
@@ -85,7 +85,7 @@ keymap = runKeys $ do
rawMask shiftMask $ subkeys $ do
bind xK_F1 $ -- Make it harder to close so I don't accidentally git it.
- rawMask shiftMask $ click >> kill
+ rawMask shiftMask $ click >> CopyWindow.kill1
-- I Don't really use these, but they could be bound to something cool!
bind xK_F2 $
@@ -131,20 +131,25 @@ keymap = runKeys $ do
bind xK_c $ do
justMod runPassMenu
- shiftMod kill
+ shiftMod CopyWindow.kill1
bind xK_f $ do
justMod $ sendMessage FlipLayout
shiftMod $ sendMessage HFlipLayout
bind xK_g $ do
- justMod $ subkeys $ do
- mapNumbersAndAlpha 0 gotoWorkspace
- shiftMod $ subkeys $ do
- mapNumbersAndAlpha 0 shiftToWorkspace
- mapNumbersAndAlpha shiftMask (\i -> windows (CopyWindow.copy [i]))
- shiftAltMod $ subkeys $ do
- mapNumbersAndAlpha 0 swapWorkspace
+ justMod $ mapNextString $ \_ str ->
+ case str of
+ [ch] | isAlphaNum ch -> gotoWorkspace ch
+ _ -> return ()
+ shiftMod $ mapNextString $ \_ str ->
+ case str of
+ [ch] | isAlphaNum ch -> shiftToWorkspace ch
+ _ -> return ()
+ shiftAltMod $ mapNextString $ \_ str ->
+ case str of
+ [ch] | isAlphaNum ch -> swapWorkspace ch
+ _ -> return ()
bind xK_h $ do
justMod $ windows W.focusDown
@@ -207,7 +212,24 @@ keymap = runKeys $ do
justMod $ sendMessage ToggleStruts
bind xK_z $ do
+
justMod $ subkeys $ do
+
+ bind xK_g $ do
+ (justMod -|- noMod) $ mapNextString $ \_ s ->
+ case s of
+ [ch] | isAlphaNum ch -> windows (CopyWindow.copy s)
+ _ -> return ()
+
+ bind xK_p $ do
+ (justMod -|- noMod) $ mapNextString $ \_ str ->
+ spawn $ printf "gxmessage 'typed: \"%s\"\ncodes: \"%s\"\nunicode: รก\n'"
+ str
+ (show (map ord str))
+
+ bind xK_c $ do
+ shiftMod $ CopyWindow.killAllOtherCopies
+
-- Double-tap Z to toggle zoom.
bind xK_z $ do