-
Notifications
You must be signed in to change notification settings - Fork 1
/
.wezterm.lua
47 lines (41 loc) · 1.15 KB
/
.wezterm.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
local wezterm = require("wezterm")
local config = {}
if wezterm.config_builder then
config = wezterm.config_builder()
end
config.default_prog = { "/usr/bin/fish", "-l" }
config.warn_about_missing_glyphs = false
config.window_decorations = "RESIZE"
-- wezterm.on("format-tab-title", function(tab, tabs, panes, config, hover, max_width)
-- local pane_title = tab.active_pane.title
-- local user_title = tab.active_pane.user_vars.panetitle
--
-- if user_title ~= nil and #user_title > 0 then
-- pane_title = user_title
-- end
--
-- return {
-- { Background = { Color = "blue" } },
-- { Foreground = { Color = "white" } },
-- { Text = " " .. pane_title .. " " },
-- }
-- end)
local act = wezterm.action
config.keys = {
{
key = "E",
mods = "CTRL|SHIFT",
action = act.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),
}),
},
}
return config