feat(core): make wezterm nushell and nvim adapt theme

Now all the terminal themes will adapt with the system theme. Like other apps
it will not do this automatically, however needing to restart the terminal
session is not to much is an issue.
This commit is contained in:
Ade Attwood 2025-07-25 11:26:36 +01:00
parent 2b73b75ad3
commit 8cdd862133
3 changed files with 27 additions and 8 deletions

View file

@ -25,3 +25,8 @@ $env.config = {
$env.config.show_banner = false
$env.config.shell_integration.osc133 = false
if $env.OS_THEME == "Light" {
use std/config light-theme
$env.config.color_config = (light-theme)
}

View file

@ -1,9 +1,11 @@
" Set color theme
lua << EOF
require("nord").setup({})
EOF
colorscheme nord
" Set color theme based on the OS theme
if $OS_THEME ==# 'Dark'
set background=dark
colorscheme tairiki
else
set background=light
colorscheme tairiki
end
" Set tailing white space to errors
match ErrorMsg '\s\+$'

View file

@ -1,7 +1,15 @@
local wezterm = require "wezterm"
function scheme_for_appearance(appearance)
if appearance:find 'Dark' then
return 'Tomorrow Night'
else
return 'Tomorrow'
end
end
local scheme = wezterm.get_builtin_color_schemes()
local theme = scheme["Poimandres"]
local theme = scheme[scheme_for_appearance(wezterm.gui.get_appearance())]
function collect_executables(process)
local executables = {}
@ -58,8 +66,12 @@ return {
family = "Hasklug Nerd Font Mono",
},
set_environment_variables = {
OS_THEME = wezterm.gui.get_appearance()
},
-- -- The nord theme to fit with everyting else
color_scheme = "Poimandres",
color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()),
colors = {
tab_bar = {
background = theme.background,