2023-10-06 19:48:04 +03:00
|
|
|
local wt = require('wezterm')
|
|
|
|
|
|
|
|
local current = {}
|
2023-10-13 13:18:23 +03:00
|
|
|
|
2023-10-16 12:31:18 +03:00
|
|
|
-- colors
|
2024-03-28 16:45:27 +02:00
|
|
|
local color_scheme = 'Solarized Light (Gogh)'
|
|
|
|
local tab_fg = '#657b83'
|
|
|
|
local tab_bg = '#eee8d5'
|
|
|
|
local tab_bg_active = '#fdf6e3'
|
|
|
|
local cursor_fg = '#fdf6e3'
|
|
|
|
local cursor_bg = '#cb4b16'
|
2023-10-16 12:31:18 +03:00
|
|
|
|
2023-10-13 13:18:23 +03:00
|
|
|
-- fonts
|
|
|
|
local fonts = wt.config_builder()
|
2024-09-05 18:33:30 +03:00
|
|
|
fonts.font = wt.font('IBM Plex Mono')
|
|
|
|
fonts.harfbuzz_features = {'ss03'}
|
2023-10-13 13:18:23 +03:00
|
|
|
|
|
|
|
-- theme
|
|
|
|
local theme = wt.config_builder()
|
2023-10-16 12:31:18 +03:00
|
|
|
theme.color_scheme = color_scheme
|
2023-10-13 13:18:23 +03:00
|
|
|
theme.colors = {
|
2023-10-16 12:31:18 +03:00
|
|
|
cursor_fg = cursor_fg,
|
|
|
|
cursor_bg = cursor_bg,
|
2023-10-13 13:18:23 +03:00
|
|
|
tab_bar = {
|
|
|
|
background = tab_bg,
|
|
|
|
active_tab = {
|
|
|
|
fg_color = tab_fg,
|
|
|
|
bg_color = tab_bg_active
|
|
|
|
},
|
|
|
|
inactive_tab = {
|
|
|
|
fg_color = tab_fg,
|
|
|
|
bg_color = tab_bg
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
theme.colors.tab_bar.inactive_tab_hover = theme.colors.tab_bar.inactive_tab
|
|
|
|
theme.window_frame = {
|
|
|
|
active_titlebar_bg = tab_bg,
|
|
|
|
inactive_titlebar_bg = tab_bg
|
|
|
|
}
|
|
|
|
|
2023-10-06 19:48:04 +03:00
|
|
|
local overrides = {
|
2023-10-13 13:18:23 +03:00
|
|
|
fonts = fonts,
|
|
|
|
theme = theme
|
2023-10-06 19:48:04 +03:00
|
|
|
}
|
|
|
|
|
2024-11-18 11:36:32 +02:00
|
|
|
local function toggle_overrides(window, conf)
|
|
|
|
for k, v in pairs(conf) do
|
2023-10-06 19:48:04 +03:00
|
|
|
if current[k] == v then
|
|
|
|
current[k] = nil
|
|
|
|
else
|
|
|
|
current[k] = v
|
|
|
|
end
|
|
|
|
end
|
|
|
|
window:set_config_overrides(current)
|
|
|
|
end
|
|
|
|
|
|
|
|
local function reset_overrides(window)
|
|
|
|
window:set_config_overrides()
|
|
|
|
current = {}
|
|
|
|
end
|
|
|
|
|
|
|
|
wt.on('override-theme', function(window) toggle_overrides(window, overrides.theme) end)
|
|
|
|
wt.on('override-fonts', function(window) toggle_overrides(window, overrides.fonts) end)
|
|
|
|
wt.on('override-reset', reset_overrides)
|