From 94b0d93926d11f3e0c8b4f718fc254e5c10bb7f7 Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Tue, 13 Aug 2024 22:55:14 +0200 Subject: [PATCH] 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. --- terminal/.config/wezterm/maps.lua | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/terminal/.config/wezterm/maps.lua b/terminal/.config/wezterm/maps.lua index 006436a..1b66ed9 100644 --- a/terminal/.config/wezterm/maps.lua +++ b/terminal/.config/wezterm/maps.lua @@ -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" }) }, }