-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy paththeme.lua
75 lines (67 loc) · 1.89 KB
/
theme.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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
local wezterm = require("wezterm")
local module = {}
local colors = {}
local selected_scheme = "Catppuccin Frappe"
local scheme = wezterm.get_builtin_color_schemes()[selected_scheme]
colors.active_fg = scheme.ansi[6]
colors.bg = scheme.background
colors.hl_1 = scheme.ansi[5]
colors.hl_2 = scheme.ansi[4]
local bg = wezterm.color.parse(scheme.background)
local _, _, l, _ = bg:hsla()
if l > 0.5 then
colors.inactive_fg = bg:complement_ryb():darken(0.3)
colors.panel_bg = bg:darken(0.069)
else
colors.inactive_fg = bg:complement_ryb():lighten(0.3)
colors.panel_bg = bg:lighten(0.069)
end
if selected_scheme == "Catppuccin Latte" then
-- This is a special case; I don't like the selection_bg.
colors.active_bg = colors.panel_bg
else
colors.active_bg = scheme.selection_bg or colors.panel_bg
end
scheme.cursor_bg = colors.active_fg
scheme.split = colors.inactive_fg
scheme.tab_bar = {
background = "none", -- tab_bar
new_tab = {
bg_color = "none", -- new_tab
fg_color = colors.hl_2,
},
active_tab = {
bg_color = colors.active_bg,
fg_color = colors.active_fg,
},
inactive_tab = {
bg_color = "none",
fg_color = colors.inactive_fg,
},
inactive_tab_hover = {
bg_color = "none",
fg_color = colors.inactive_fg,
},
}
module.colors = colors
function module.apply_to_config(config)
config.color_scheme = selected_scheme
config.color_schemes = {
[selected_scheme] = scheme,
}
config.command_palette_bg_color = colors.panel_bg
config.command_palette_fg_color = colors.hl_1
config.inactive_pane_hsb = {
saturation = 0.66,
brightness = 0.54,
}
config.font = wezterm.font("VictorMono NF")
config.font_size = 17
config.macos_window_background_blur = 23
config.tab_bar_at_bottom = true
config.tab_max_width = 96
config.use_fancy_tab_bar = false
config.window_background_opacity = 0.91247
config.window_decorations = "RESIZE"
end
return module