forked from dineshsalunke/wezterm-config
refactor: switch theme based on system appearence
This commit is contained in:
parent
038eff7610
commit
6812ae050b
17
terminal.lua
17
terminal.lua
@ -8,9 +8,24 @@ M.colors = {
|
||||
transparent = "rgba(0,0,0,0)",
|
||||
}
|
||||
|
||||
local function get_appearance()
|
||||
if term.gui then
|
||||
return term.gui.get_appearance()
|
||||
end
|
||||
return "Dark"
|
||||
end
|
||||
|
||||
local function scheme_for_appearance(appearance)
|
||||
if appearance:find("Dark") then
|
||||
return "catppuccin-mocha"
|
||||
else
|
||||
return "catppuccin-latte"
|
||||
end
|
||||
end
|
||||
|
||||
function M.options(config)
|
||||
config.status_update_interval = 1000
|
||||
config.color_scheme = "Catppuccin Mocha"
|
||||
config.color_scheme = scheme_for_appearance(get_appearance())
|
||||
|
||||
config.animation_fps = 240
|
||||
config.max_fps = 240
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user