wezterm: Add experimental tab naming mapping

This is something I used to use quite a bit in tmux. I have a feeling I
will not be making extensive use of it in wezterm, but can always remove
it if I reach the point of forgetting the mapping later.
This commit is contained in:
Marty Oehme 2024-08-13 22:55:14 +02:00
parent 2dd5f6e02d
commit 94b0d93926
Signed by: Marty
GPG key ID: EDBF2ED917B2EF6A

View file

@ -104,6 +104,18 @@ local keys = {
{ key = "e", mods = "LEADER", action = act.EmitEvent("edit-scrollback") },
{ key = "a", mods = "CTRL|ALT", action = act.EmitEvent("toggle-leader") },
{ key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") },
{
key = ":",
mods = "LEADER|SHIFT",
action = act.PromptInputLine({
description = "Tab name: ",
action = wezterm.action_callback(function(window, _, line)
if line then
window:active_tab():set_title(line)
end
end),
}),
},
{ key = "Enter", mods = "CTRL", action = wezterm.action({ SendString = "\x1b[13;5u" }) },
{ key = "Enter", mods = "SHIFT", action = wezterm.action({ SendString = "\x1b[13;2u" }) },
}