Follow system theme colorscheme
This commit is contained in:
parent
36a549de57
commit
6e88c23a9d
1 changed files with 31 additions and 6 deletions
|
|
@ -1,10 +1,35 @@
|
||||||
-- {{ ansible_managed }}
|
-- {{ ansible_managed }}
|
||||||
|
|
||||||
|
local wezterm = require 'wezterm'
|
||||||
|
|
||||||
|
-- wezterm.gui is not available to the mux server, so take care to
|
||||||
|
-- do something reasonable when this config is evaluated by the mux
|
||||||
|
local function get_appearance()
|
||||||
|
if wezterm.gui then
|
||||||
|
return wezterm.gui.get_appearance()
|
||||||
|
end
|
||||||
|
return 'Dark'
|
||||||
|
end
|
||||||
|
|
||||||
|
local function scheme_for_appearance(appearance)
|
||||||
|
if appearance:find 'Dark' then
|
||||||
|
return 'Dark'
|
||||||
|
else
|
||||||
|
return 'Light'
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
return {
|
return {
|
||||||
colors = {
|
color_schemes = {
|
||||||
-- The default text color
|
['Dark'] = {
|
||||||
foreground = 'black',
|
background = 'rgb(41, 46, 50)',
|
||||||
-- The default background color
|
foreground = 'white'
|
||||||
background = 'white'
|
},
|
||||||
}
|
['Light'] = {
|
||||||
|
background = 'white',
|
||||||
|
foreground = 'black'
|
||||||
|
},
|
||||||
|
},
|
||||||
|
|
||||||
|
color_scheme = scheme_for_appearance(get_appearance()),
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue