Created
August 26, 2016 16:54
-
-
Save michaelavila/03e1a38ed73cdb7db0e029f5c86fda5b to your computer and use it in GitHub Desktop.
Toggle light/dark for terminal + vim
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let base16colorspace=256 | |
colorscheme base16-default-dark | |
let shellbg=$SHELLBG | |
if shellbg == 'dark' | |
set background=dark | |
highlight LineNr ctermfg=blue ctermbg=black | |
else | |
set background=light | |
highlight LineNr ctermfg=blue ctermbg=white | |
endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# colors | |
BASE16_SCHEME="default" | |
SHELLBG="dark" | |
darken () { | |
export SHELLBG="dark" | |
colorize | |
PROMPT=$'$FG[240]%~ $FG[255]% ${vcs_info_msg_0_}\n$ ' | |
} | |
lighten () { | |
export SHELLBG="light" | |
colorize | |
PROMPT=$'$FG[240]%~ $FG[0]% ${vcs_info_msg_0_}\n$ ' | |
} | |
colorize () { | |
SHELL_SCHEME="base16-${BASE16_SCHEME}-${SHELLBG}.sh" | |
BASE16_SHELL="$HOME/.terminal/colors/base16-shell/scripts/${SHELL_SCHEME}" | |
[[ -s $BASE16_SHELL ]] && source $BASE16_SHELL | |
} | |
darken # default to dark colors |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment