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:
parent
2b73b75ad3
commit
8cdd862133
3 changed files with 27 additions and 8 deletions
|
|
@ -25,3 +25,8 @@ $env.config = {
|
||||||
|
|
||||||
$env.config.show_banner = false
|
$env.config.show_banner = false
|
||||||
$env.config.shell_integration.osc133 = false
|
$env.config.shell_integration.osc133 = false
|
||||||
|
|
||||||
|
if $env.OS_THEME == "Light" {
|
||||||
|
use std/config light-theme
|
||||||
|
$env.config.color_config = (light-theme)
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,11 @@
|
||||||
" Set color theme
|
" Set color theme based on the OS theme
|
||||||
lua << EOF
|
if $OS_THEME ==# 'Dark'
|
||||||
require("nord").setup({})
|
set background=dark
|
||||||
EOF
|
colorscheme tairiki
|
||||||
|
else
|
||||||
colorscheme nord
|
set background=light
|
||||||
|
colorscheme tairiki
|
||||||
|
end
|
||||||
|
|
||||||
" Set tailing white space to errors
|
" Set tailing white space to errors
|
||||||
match ErrorMsg '\s\+$'
|
match ErrorMsg '\s\+$'
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,15 @@
|
||||||
local wezterm = require "wezterm"
|
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 scheme = wezterm.get_builtin_color_schemes()
|
||||||
local theme = scheme["Poimandres"]
|
local theme = scheme[scheme_for_appearance(wezterm.gui.get_appearance())]
|
||||||
|
|
||||||
function collect_executables(process)
|
function collect_executables(process)
|
||||||
local executables = {}
|
local executables = {}
|
||||||
|
|
@ -58,8 +66,12 @@ return {
|
||||||
family = "Hasklug Nerd Font Mono",
|
family = "Hasklug Nerd Font Mono",
|
||||||
},
|
},
|
||||||
|
|
||||||
|
set_environment_variables = {
|
||||||
|
OS_THEME = wezterm.gui.get_appearance()
|
||||||
|
},
|
||||||
|
|
||||||
-- -- The nord theme to fit with everyting else
|
-- -- The nord theme to fit with everyting else
|
||||||
color_scheme = "Poimandres",
|
color_scheme = scheme_for_appearance(wezterm.gui.get_appearance()),
|
||||||
colors = {
|
colors = {
|
||||||
tab_bar = {
|
tab_bar = {
|
||||||
background = theme.background,
|
background = theme.background,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue