-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.wezterm.lua
82 lines (73 loc) · 1.63 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
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
76
77
78
79
80
81
82
-- Pull in the wezterm API
local wezterm = require("wezterm")
-- This will hold the configuration.
local config = wezterm.config_builder()
function on_dark_mode(overrides)
overrides.colors = {
tab_bar = {
background = "#232136",
active_tab = {
bg_color = "#ea9a97",
fg_color = "#232136",
},
inactive_tab = {
bg_color = "#6e6a86",
fg_color = "#e0def4",
},
new_tab = {
bg_color = "#2a273f",
fg_color = "#e0def4",
},
},
}
end
function on_light_mode(overrides)
overrides.colors = {
tab_bar = {
background = "#faf4ed",
active_tab = {
bg_color = "#d7827e",
fg_color = "#e0def4",
},
inactive_tab = {
bg_color = "#9893a5",
fg_color = "#f2e9e1",
},
new_tab = {
bg_color = "#fffaf3",
fg_color = "#575279",
},
},
}
end
function scheme_for_appearance(appearance, overrides)
if appearance:find("Dark") then
on_dark_mode(overrides)
return "catppuccin-mocha"
else
on_light_mode(overrides)
return "catppuccin-latte"
end
end
wezterm.on("window-config-reloaded", function(window, pane)
local overrides = window:get_config_overrides() or {}
local appearance = window:get_appearance()
local scheme = scheme_for_appearance(appearance, overrides)
if overrides.color_scheme ~= scheme then
overrides.color_scheme = scheme
window:set_config_overrides(overrides)
end
end)
config.font = wezterm.font("CommitMono")
config.font_size = 14
config.enable_tab_bar = false
config.use_fancy_tab_bar = false
config.tab_bar_at_bottom = true
config.window_padding = {
left = "1cell",
right = "1cell",
top = 0,
bottom = 0,
}
config.window_decorations = "RESIZE"
return config