wezterm: Add ability to close current pane

Using <C-A>x you can close the currently highlighted
pane. Will not ask confirmation so be careful.
This commit is contained in:
Marty Oehme 2023-07-23 19:29:12 +02:00
parent 5712a5bf64
commit 9811d801b8
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -3,7 +3,6 @@ local act = wezterm.action
local keys = { local keys = {
{ key = "O", mods = "CTRL", action = act.ShowDebugOverlay }, { key = "O", mods = "CTRL", action = act.ShowDebugOverlay },
{ key = "[", mods = "CTRL", action = act.ScrollToPrompt(-1) }, { key = "[", mods = "CTRL", action = act.ScrollToPrompt(-1) },
{ key = "]", mods = "CTRL", action = act.ScrollToPrompt(1) }, { key = "]", mods = "CTRL", action = act.ScrollToPrompt(1) },
{ -- vertical pane { -- vertical pane
@ -36,6 +35,7 @@ local keys = {
mods = "CTRL", mods = "CTRL",
action = act.EmitEvent("ActivatePaneDirection-right"), action = act.EmitEvent("ActivatePaneDirection-right"),
}, },
{ key = "x", mods = "LEADER", action = act.CloseCurrentPane({ confirm = false }) },
{ key = "z", mods = "LEADER", action = act.TogglePaneZoomState }, { key = "z", mods = "LEADER", action = act.TogglePaneZoomState },
{ key = " ", mods = "LEADER", action = act.RotatePanes("Clockwise") }, { key = " ", mods = "LEADER", action = act.RotatePanes("Clockwise") },
{ key = "q", mods = "LEADER", action = act.PaneSelect({ mode = "Activate" }) }, { key = "q", mods = "LEADER", action = act.PaneSelect({ mode = "Activate" }) },