From 618a571f77f8c3d55b708caa8548e0cfa1143021 Mon Sep 17 00:00:00 2001 From: sgoudham Date: Tue, 30 Jan 2024 22:42:15 +0000 Subject: [PATCH] feat(wezterm): bind to rename tab --- home/apps/wezterm/binds.lua | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/home/apps/wezterm/binds.lua b/home/apps/wezterm/binds.lua index 8739ee6..22cc32e 100644 --- a/home/apps/wezterm/binds.lua +++ b/home/apps/wezterm/binds.lua @@ -1,4 +1,4 @@ -local wezterm = require("wezterm") +local wezterm = require("wezterm") local act = wezterm.action return { @@ -34,6 +34,20 @@ return { { key = "n", mods = "ALT|SHIFT", action = act({ SpawnTab = "CurrentPaneDomain" }) }, { key = "m", mods = "ALT|SHIFT", action = act({ SpawnTab = "DefaultDomain" }) }, + -- Interactively Rename Tab + { + key = "E", + mods = "ALT|SHIFT", + action = act.PromptInputLine({ + description = "New Tab Name", + action = wezterm.action_callback(function(window, _, line) + if line then + window:active_tab():set_title(line) + end + end), + }), + }, + -- Open Links Via Keyboard { key = "o", @@ -60,5 +74,5 @@ return { mods = "CTRL", action = act.OpenLinkAtMouseCursor, }, - } -} \ No newline at end of file + }, +}