-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.wezterm.lua
More file actions
executable file
·52 lines (41 loc) · 1.25 KB
/
.wezterm.lua
File metadata and controls
executable file
·52 lines (41 loc) · 1.25 KB
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
48
49
50
51
52
local wezterm = require("wezterm")
local config = wezterm.config_builder()
config.window_background_opacity = 0.95
config.window_decorations = "RESIZE"
config.font = wezterm.font("InputMono Nerd Font")
config.font_size = 13
config.use_ime = true
config.exit_behavior_messaging = "None"
config.color_scheme = "Hybrid"
config.tab_bar_at_bottom = true
config.hide_tab_bar_if_only_one_tab = true
function tab_title(tab_info)
local title = tab_info.tab_title
if title and #title > 0 then
return title
end
return tab_info.active_pane.title
end
wezterm.on("format-tab-title", function(tab, tabs, panes, local_config, hover, max_width)
local edge_background = "transparent"
local background = "transparent"
local foreground = "#999"
if tab.is_active then
foreground = "#fff"
end
local edge_foreground = background
local title = tab_title(tab)
title = wezterm.truncate_right(title, max_width - 2)
return {
{ Background = { Color = edge_background } },
{ Foreground = { Color = edge_foreground } },
{ Text = " " },
{ Background = { Color = background } },
{ Foreground = { Color = foreground } },
{ Text = title },
{ Background = { Color = edge_background } },
{ Foreground = { Color = edge_foreground } },
{ Text = " " },
}
end)
return config