diff options
| author | Josh Rahm <rahm@google.com> | 2022-03-28 14:05:30 -0600 |
|---|---|---|
| committer | Josh Rahm <joshuarahm@gmail.com> | 2022-10-09 12:19:45 -0600 |
| commit | 8a87b96dceb52cd3090bd9c2b1c5648f310389b0 (patch) | |
| tree | 56fe66beb857771e921ae6936e5afa439e376813 /src/Main.hs | |
| parent | 2169e0ca8a9673b600c40a81de61fc0d86e89452 (diff) | |
| download | rde-8a87b96dceb52cd3090bd9c2b1c5648f310389b0.tar.gz rde-8a87b96dceb52cd3090bd9c2b1c5648f310389b0.tar.bz2 rde-8a87b96dceb52cd3090bd9c2b1c5648f310389b0.zip | |
add swallow behavior. Add more Chrome bindings.
Diffstat (limited to 'src/Main.hs')
| -rw-r--r-- | src/Main.hs | 32 |
1 files changed, 29 insertions, 3 deletions
diff --git a/src/Main.hs b/src/Main.hs index 8abee5e..0018fa2 100644 --- a/src/Main.hs +++ b/src/Main.hs @@ -11,6 +11,7 @@ import XMonad.Layout.Fullscreen (fullscreenEventHook) import System.Environment (setEnv) import Data.Monoid +import Internal.Swallow import Internal.Windows import Internal.XMobarLog import Internal.Keys @@ -50,8 +51,30 @@ main = do -- ctrl+shift+backspace , rebindKey (controlMask, xK_u) (controlMask .|. shiftMask, xK_BackSpace) - -- Make it to ctrl+b deletes the current tab instead of ctrl+w. - , rebindKey (controlMask, xK_b) (controlMask, xK_w) + -- Make it to ctrl+d deletes the current tab instead of ctrl+w. + , rebindKey (controlMask, xK_e) (controlMask, xK_w) + + -- Vim-ish keybindings to go back and forward. + , rebindKey (controlMask, xK_b) (controlMask, xK_Left) + , rebindKey (controlMask, xK_e) (controlMask, xK_Right) + , rebindKey (controlMask .|. shiftMask, xK_b) (controlMask .|. shiftMask, xK_Left) + , rebindKey (controlMask .|. shiftMask, xK_e) (controlMask .|. shiftMask, xK_Right) + + -- Baskic Vim-like motion with the alt key. + , rebindKey (mod1Mask, xK_h) (0, xK_Left) + , rebindKey (mod1Mask, xK_j) (0, xK_Down) + , rebindKey (mod1Mask, xK_k) (0, xK_Up) + , rebindKey (mod1Mask, xK_l) (0, xK_Right) + + , rebindKey (shiftMask .|. mod1Mask, xK_h) (shiftMask, xK_Left) + , rebindKey (shiftMask .|. mod1Mask, xK_j) (shiftMask, xK_Down) + , rebindKey (shiftMask .|. mod1Mask, xK_k) (shiftMask, xK_Up) + , rebindKey (shiftMask .|. mod1Mask, xK_l) (shiftMask, xK_Right) + + , rebindKey (controlMask .|. mod1Mask, xK_h) (controlMask, xK_Left) + , rebindKey (controlMask .|. mod1Mask, xK_j) (controlMask, xK_Down) + , rebindKey (controlMask .|. mod1Mask, xK_k) (controlMask, xK_Up) + , rebindKey (controlMask .|. mod1Mask, xK_l) (controlMask, xK_Right) ] ]) $ def { terminal = "alacritty" @@ -78,7 +101,10 @@ main = do ] , workspaces = map return (['0'..'9'] ++ ['a'..'z']) , handleEventHook = - composeAll [fullscreenEventHook, remapHook] + composeAll [ + fullscreenEventHook, + remapHook, + swallowHook] , focusFollowsMouse = False , clickJustFocuses = False , logHook = xMobarLogHook xmobar |