1
0
Fork 0
vdotfiles/gui/.config/wezterm/overrides.lua

32 lines
828 B
Lua
Raw Normal View History

2023-10-06 19:48:04 +03:00
local wt = require('wezterm')
local current = {}
local overrides = {
fonts = {
font = wt.font('JetBrains Mono'),
font_size = 11,
harfbuzz_features = {'calt=0', 'clig=0', 'liga=0'}
},
theme = {color_scheme = 'GruvboxDark'}
}
local function toggle_overrides(window, overrides)
for k, v in pairs(overrides) do
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)