diff options
| author | Josh Rahm <rahm@google.com> | 2021-11-22 17:09:47 -0700 |
|---|---|---|
| committer | Josh Rahm <rahm@google.com> | 2021-11-22 17:09:47 -0700 |
| commit | 0c8f4b67032a6bb226665bad60417f1007cd60ee (patch) | |
| tree | ecf75aabf374b27d46e8ce8a84176287b9d20d41 /src/Internal/Keys.hs | |
| parent | 245e135bf003ca9420f21dc82727a9b9b4f0bdcf (diff) | |
| download | rde-0c8f4b67032a6bb226665bad60417f1007cd60ee.tar.gz rde-0c8f4b67032a6bb226665bad60417f1007cd60ee.tar.bz2 rde-0c8f4b67032a6bb226665bad60417f1007cd60ee.zip | |
Mess with some other keybindings.
Diffstat (limited to 'src/Internal/Keys.hs')
| -rw-r--r-- | src/Internal/Keys.hs | 44 |
1 files changed, 33 insertions, 11 deletions
diff --git a/src/Internal/Keys.hs b/src/Internal/Keys.hs index 88b90dc..dec7f44 100644 --- a/src/Internal/Keys.hs +++ b/src/Internal/Keys.hs @@ -54,12 +54,12 @@ keymap = runKeys $ do bind xK_apostrophe $ do justMod $ subkeys $ do bind xK_apostrophe $ - justMod jumpToLast + (noMod -|- justMod) jumpToLast mapAlpha 0 jumpToMark shiftMod $ subkeys $ do bind xK_apostrophe $ - shiftMod swapWithLastMark + (noMod -|- shiftMod -|- rawMask shiftMask) swapWithLastMark mapAlpha shiftMask swapWithMark bind xK_BackSpace $ do @@ -69,17 +69,28 @@ keymap = runKeys $ do rawMask mod4Mask $ spawn "xterm" justMod $ spawn "pkill -SIGUSR 1 xmobar" - bind xK_F1 $ + bind xK_F1 $ do -- Button programmed on mouse - shiftMod $ click >> withFocused (windows . W.sink) + rawMask shiftMask $ click >> withFocused (windows . W.sink) + + shiftMod $ spawn "spotify-control play" bind xK_F2 $ -- Button programmed on mouse - shiftMod $ click >> sendMessage ToggleZoom + rawMask shiftMask $ click >> sendMessage ToggleZoom bind xK_F3 $ -- Button programmed on mouse - shiftMod $ click >> kill + rawMask shiftMask $ subkeys $ do + + bind xK_F1 $ -- Make it harder to close so I don't accidentally git it. + rawMask shiftMask $ click >> kill + + -- I Don't really use these, but they could be bound to something cool! + bind xK_F2 $ + rawMask shiftMask $ spawn "spotify-control next" + bind xK_F3 $ + rawMask shiftMask $ spawn "spotify-control prev" bind xK_F10 $ do justMod $ spawn "spotify-control play" @@ -109,10 +120,10 @@ keymap = runKeys $ do shiftMod $ withScreen W.shift idx bind xK_bracketright $ do - justMod $ sendMessage $ modifyWindowBorder (-1) + justMod $ sendMessage $ modifyWindowBorder 5 bind xK_bracketleft $ do - justMod $ sendMessage $ modifyWindowBorder 1 + justMod $ sendMessage $ modifyWindowBorder (-5) bind xK_b $ do justMod $ spawn "bluetooth-select.sh" @@ -192,7 +203,18 @@ keymap = runKeys $ do justMod $ sendMessage ToggleStruts bind xK_z $ do - justMod $ sendMessage ToggleZoom + justMod $ subkeys $ do + -- Z is reserved to create sub keybindings to do various things. + -- I don't really use these at the moment. + bind xK_h $ do + noMod $ spawn "spotify-control prev" + + bind xK_l $ do + noMod $ spawn "spotify-control next" + + -- Centers the current focused window. i.e. toggles the Zoom layout + -- modifier. + shiftMod $ sendMessage ToggleZoom mouseMap :: ButtonsMap l mouseMap = runButtons $ do @@ -212,10 +234,10 @@ mouseMap = runButtons $ do justMod $ const (relativeWorkspaceShift next) bind (8 :: Button) $ - justMod $ const (relativeWorkspaceShift prev) + justMod $ const $ spawn "spotify-control prev" bind (9 :: Button) $ - justMod $ const (relativeWorkspaceShift next) + justMod $ const $ spawn "spotify-control next" applyKeys :: XConfig l -> IO (XConfig l) applyKeys config@(XConfig {modMask = modm}) = |