wezterm: config restructure
This commit is contained in:
parent
edccffb4d6
commit
970436c17c
4 changed files with 92 additions and 79 deletions
31
gui/.config/wezterm/overrides.lua
Normal file
31
gui/.config/wezterm/overrides.lua
Normal file
|
@ -0,0 +1,31 @@
|
|||
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)
|
Loading…
Add table
Add a link
Reference in a new issue