1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
local M = {}
local wezterm = require 'wezterm'
local disabled_keys = {
{
key = 'M',
mods = 'CTRL',
action = wezterm.action.DisableDefaultAssignment,
},
{
key = 'Enter',
mods = 'ALT',
action = wezterm.action.DisableDefaultAssignment,
},
{
key = 'P',
mods = 'CTRL',
action = wezterm.action.DisableDefaultAssignment,
},
}
function M.apply_to_config(config)
config.leader = {
key = ';',
mods = 'CTRL',
}
config.keys = {}
for _, disabled_map in ipairs(disabled_keys) do
table.insert(config.keys, disabled_map)
end
table.insert(config.keys, {
key = ';',
mods = 'LEADER',
action = wezterm.action.ActivateCommandPalette,
})
end
return M
|