1
Fork 0

Add more Slambda chords & disable Wezterm keybind

In particular, `alt+enter` is a keybind in `catgirl` which I couldn't access
because of the default `wezterm`  keybinds
This commit is contained in:
Matei Adriel 2024-01-31 02:59:03 +01:00
parent feaf49d8e3
commit ced418a65b
No known key found for this signature in database
2 changed files with 31 additions and 20 deletions

View file

@ -76,18 +76,19 @@ config.enable_csi_u_key_encoding = true -- For some reason I need this for all k
-- }}}
-- }}}
-- {{{ Keybinds
local function unmap(key, mods)
return {
key = key,
mods = mods,
action = wezterm.action.DisableDefaultAssignment,
}
end
config.keys = {
-- {{{ Disable certain default keybinds
{
key = "f",
mods = "CTRL|SHIFT",
action = wezterm.action.DisableDefaultAssignment,
},
{
key = "w",
mods = "CTRL|SHIFT",
action = wezterm.action.DisableDefaultAssignment,
},
unmap("f", "CTRL|SHIFT"),
unmap("w", "CTRL|SHIFT"),
unmap("Enter", "ALT"),
-- }}}
}
-- }}}

View file

@ -1,25 +1,35 @@
let
chord = from: to: { inherit from to; };
unmap = from: chord from [ ];
# I want my brackets to be aligned
sem = "semicolon";
commonChords = [
# {{{ Modifiers
(chord [ "s" "d" ] [ "leftshift" ])
(chord [ "s" "f" ] [ "leftctrl" ])
(chord [ "s" "a" ] [ "leftalt" ])
(chord [ "l" "k" ] [ "rightshift" ])
(chord [ "l" "j" ] [ "rightctrl" ])
(chord [ "l" "semicolon" ] [ "rightalt" ])
# {{{ right
(chord [ "l" "n" ] [ "rightmeta" ])
(chord [ "k" "l" ] [ "rightshift" ])
(chord [ "j" "l" ] [ "rightctrl" ])
(chord [ "l" sem ] [ "rightalt" ])
(chord [ "j" "k" "l" ] [ "rightctrl" "rightshift" ])
(chord [ "s" "d" "f" ] [ "leftctrl" "leftshift" ])
(unmap [ "leftalt" ])
# (unmap [ "leftshift" ]) # Useful for touhou
(unmap [ "leftctrl" ])
(chord [ "k" "l" sem ] [ "rightalt" "rightshift" ])
(chord [ "j" "k" "l" sem ] [ "rightalt" "rightctrl" "rightshift" ])
(unmap [ "rightshift" ])
(unmap [ "rightctrl" ])
(unmap [ "rightalt" ])
(unmap [ "rightmeta" ])
# }}}
# {{{ left
(chord [ "s" "d" ] [ "leftshift" ])
(chord [ "s" "f" ] [ "leftctrl" ])
(chord [ "s" "a" ] [ "leftalt" ])
(chord [ "s" "d" "f" ] [ "leftctrl" "leftshift" ])
(chord [ "a" "s" "d" ] [ "leftalt" "leftshift" ])
(chord [ "a" "s" "d" "f" ] [ "leftalt" "leftctrl" "leftshift" ])
(unmap [ "leftalt" ])
(unmap [ "leftctrl" ])
# (unmap [ "leftshift" ]) # Useful for touhou
# }}}
# }}}
# {{{ Other special keys
(chord [ "g" "h" ] [ "backspace" ])
(chord [ "n" "v" ] [ "backslash" ])