Light mode support in shell, now.

This commit is contained in:
2025-07-22 14:21:19 -04:00
parent 5f408f688b
commit 8d31077048
3 changed files with 13 additions and 2 deletions

View File

@ -103,6 +103,10 @@ set ansi_15="FFFFFF"
alias set-terminal-colors echo "]4\;0\;#${ansi_0}\;1\;#${ansi_1}\;2\;#${ansi_2}\;3\;#${ansi_3}\;4\;#${ansi_4}\;5\;#${ansi_5}\;6\;#${ansi_6}\;7\;#${ansi_7}\;8\;#${ansi_8}\;9\;#${ansi_9}\;10\;#${ansi_10}\;11\;#${ansi_11}\;12\;#${ansi_12}\;13\;#${ansi_13}\;14\;#${ansi_14}\;15\;#${ansi_15}"
alias set-light-mode setenv CSHENV_LIGHT_MODE 1\;echo "]10\;#000000]11\;#ffffff]12\;#ff0000"
alias set-dark-mode unsetenv CSHENV_LIGHT_MODE\;echo "]10\;#ffffff]11\;#000000]12\;#00ff00"
alias home-mode unsetenv CSHENV_LIGHT_MODE\;echo "]104\;]110]111]112"
alias reset-terminal-colors echo "]104\;"
###########################

View File

@ -2,10 +2,11 @@
hi clear normal
"set bg&
set background=light
" remove all existing highlighting and set the defaults.
hi clear
" load the syntax highlighting defaults, if it's enabled.
"set background=light
" load the syntax highlighting defaults, if it's enabled.
if exists("syntax_on")
syntax reset
endif

View File

@ -7,12 +7,18 @@ syntax on
"The adam color scheme has both syntax colors and adam colorscheme now.
"This fixes the longstanding xterm-256color issues I've had.
"let light_mode_env=$CSHENV_LIGHT_MODE
colors adam
let light_mode_env=$CSHENV_LIGHT_MODE
if light_mode_env == '1'
colors adam-light
endif
source ~/.vim/vimrc.globalprefs
source ~/.vim/vimrc.defkeymaps