feat: WezTerm init
This commit is contained in:
76
.config/wezterm/modules/mappings.lua
Normal file
76
.config/wezterm/modules/mappings.lua
Normal file
@ -0,0 +1,76 @@
|
||||
local wezterm = require("wezterm")
|
||||
local act = wezterm.action
|
||||
|
||||
return {
|
||||
leader = { key = "a", mods = "CTRL", timeout_milliseconds = 1002 },
|
||||
|
||||
keys = {
|
||||
{
|
||||
key = "w",
|
||||
mods = "CMD",
|
||||
action = act.CloseCurrentPane({ confirm = true }),
|
||||
},
|
||||
|
||||
-- activate resize mode
|
||||
{
|
||||
key = "r",
|
||||
mods = "LEADER",
|
||||
action = act.ActivateKeyTable({
|
||||
name = "resize_pane",
|
||||
one_shot = false,
|
||||
}),
|
||||
},
|
||||
|
||||
-- focus panes
|
||||
{
|
||||
key = "k",
|
||||
mods = "LEADER",
|
||||
action = act.ActivatePaneDirection("Left"),
|
||||
},
|
||||
{
|
||||
key = "i",
|
||||
mods = "LEADER",
|
||||
action = act.ActivatePaneDirection("Right"),
|
||||
},
|
||||
{
|
||||
key = "e",
|
||||
mods = "LEADER",
|
||||
action = act.ActivatePaneDirection("Up"),
|
||||
},
|
||||
{
|
||||
key = "n",
|
||||
mods = "LEADER",
|
||||
action = act.ActivatePaneDirection("Down"),
|
||||
},
|
||||
|
||||
-- add new panes
|
||||
{
|
||||
key = "v",
|
||||
mods = "LEADER",
|
||||
action = act.SplitVertical({ domain = "CurrentPaneDomain" }),
|
||||
},
|
||||
{
|
||||
key = "h",
|
||||
mods = "LEADER",
|
||||
action = act.SplitHorizontal({ domain = "CurrentPaneDomain" }),
|
||||
},
|
||||
},
|
||||
|
||||
key_tables = {
|
||||
resize_pane = {
|
||||
{ key = "LeftArrow", action = act.AdjustPaneSize({ "Left", 5 }) },
|
||||
{ key = "k", action = act.AdjustPaneSize({ "Left", 5 }) },
|
||||
|
||||
{ key = "RightArrow", action = act.AdjustPaneSize({ "Right", 5 }) },
|
||||
{ key = "i", action = act.AdjustPaneSize({ "Right", 5 }) },
|
||||
|
||||
{ key = "UpArrow", action = act.AdjustPaneSize({ "Up", 2 }) },
|
||||
{ key = "e", action = act.AdjustPaneSize({ "Up", 3 }) },
|
||||
|
||||
{ key = "DownArrow", action = act.AdjustPaneSize({ "Down", 2 }) },
|
||||
{ key = "n", action = act.AdjustPaneSize({ "Down", 2 }) },
|
||||
|
||||
{ key = "Escape", action = "PopKeyTable" },
|
||||
},
|
||||
},
|
||||
}
|
Reference in New Issue
Block a user