From 8d310770483d00b168550521ea0c56be07a584a9 Mon Sep 17 00:00:00 2001 From: ADAM David Alan Martin Date: Tue, 22 Jul 2025 14:21:19 -0400 Subject: [PATCH] Light mode support in shell, now. --- tcshrc.colors | 4 ++++ vim/colors/adam-light.vim | 3 ++- vim/vimrc | 8 +++++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/tcshrc.colors b/tcshrc.colors index 949aeca..fe5a30d 100644 --- a/tcshrc.colors +++ b/tcshrc.colors @@ -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\;" ########################### diff --git a/vim/colors/adam-light.vim b/vim/colors/adam-light.vim index a1134b9..54ae60c 100644 --- a/vim/colors/adam-light.vim +++ b/vim/colors/adam-light.vim @@ -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 diff --git a/vim/vimrc b/vim/vimrc index a1b62f2..3d4e012 100644 --- a/vim/vimrc +++ b/vim/vimrc @@ -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