From c3e2720b3c74a45ffe054525fad403bd993dc6af Mon Sep 17 00:00:00 2001 From: Marty Oehme Date: Sat, 27 Sep 2025 11:02:32 +0200 Subject: [PATCH] wezterm: Rename tabs Rename tabs with ``. This will provide a (full-screen) prompt in which you can exit with esc (not changing anything), provide a static name for the tab, or hit enter with nothing on the prompt to return to the default naming behavior. --- terminal/.config/wezterm/maps.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/terminal/.config/wezterm/maps.lua b/terminal/.config/wezterm/maps.lua index 57d0740..40cc692 100644 --- a/terminal/.config/wezterm/maps.lua +++ b/terminal/.config/wezterm/maps.lua @@ -52,6 +52,19 @@ local keys = { mods = "LEADER|CTRL", action = act.PaneSelect({ mode = "MoveToNewTab" }), }, + { + key = "R", + mods = "LEADER", + action = act.PromptInputLine({ + description = "Enter new name for tab", + action = wezterm.action_callback(function(win, _, line) + if line then + win:active_tab():set_title(line) + end + end), + }), + }, + { key = "c", mods = "LEADER", action = act.SpawnTab("CurrentPaneDomain") }, { key = ",", mods = "LEADER", action = act.ActivateTabRelative(-1) }, { key = ".", mods = "LEADER", action = act.ActivateTabRelative(1) }, -- workspace selection @@ -62,6 +75,7 @@ local keys = { mods = "LEADER", action = act.ShowLauncherArgs({ flags = "FUZZY|WORKSPACES" }), }, + { key = "t", mods = "LEADER", action = act.EmitEvent("toggle-tabbar") }, { key = "T", mods = "LEADER", action = act.ShowTabNavigator }, { key = "[", mods = "LEADER", action = act.ActivateCopyMode }, { @@ -105,7 +119,6 @@ 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",