From 3589e6257211dc15136391472a0f3c99733618c8 Mon Sep 17 00:00:00 2001 From: Xavier Detant <1016863+FaustXVI@users.noreply.github.com> Date: Tue, 15 Oct 2024 16:06:05 +0200 Subject: [PATCH] Add wezterm shortcuts --- .../system/home-manager/shells/wezterm.nix | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/modules/system/home-manager/shells/wezterm.nix b/modules/system/home-manager/shells/wezterm.nix index b965c91..c8a724c 100644 --- a/modules/system/home-manager/shells/wezterm.nix +++ b/modules/system/home-manager/shells/wezterm.nix @@ -8,6 +8,35 @@ font_size = 18, scrollback_lines = 20000, color_scheme = 'Darcula (base16)', + keys = { + { + mods = 'ALT', + key = 'w', + action = wezterm.action.CloseCurrentTab { confirm = true }, + }, { + mods = 'ALT', + key = 't', + action = wezterm.action.SpawnTab 'CurrentPaneDomain', + }, { + mods = 'SHIFT|ALT', + key = 't', + action = wezterm.action.ShowTabNavigator + }, { + key = 'e', + mods = 'ALT', + action = wezterm.action.PromptInputLine { + description = 'Enter new name for tab', + action = wezterm.action_callback(function(window, pane, line) + -- line will be `nil` if they hit escape without entering anything + -- An empty string if they just hit enter + -- Or the actual line of text they wrote + if line then + window:active_tab():set_title(line) + end + end), + }, + }, + } } ''; };