add functions for quickly changing term background

light - switch to light theme
dark - switch to dark theme

This way, the theme can quickly be changed so that terminal text can be
read on crappier projectors for presentaitons, classes, etc.
This commit is contained in:
Nick Nisi
2015-01-05 15:33:41 -06:00
parent e8afe013cf
commit b90a09a107
2 changed files with 16 additions and 2 deletions

View File

@@ -135,3 +135,12 @@ function hl() {
echo $src | highlight -O rtf --syntax $1 --font Inconsoloata --style $style --line-number --font-size 24 | pbcopy
}
# set the background color to light
function light() {
export BACKGROUND="light" && reload!
}
function dark() {
export BACKGROUND="dark" && reload!
}

View File

@@ -56,8 +56,13 @@ source `brew --prefix`/etc/profile.d/z.sh
# Base16 Shell
export THEME="base16-paraiso"
export BACKGROUND="dark"
if [ -z "$THEME" ]; then
export THEME="base16-atelierlakeside"
fi
if [ -z "$BACKGROUND" ]; then
export BACKGROUND="dark"
fi
BASE16_SHELL="$DOTFILES/.config/base16-shell/$THEME.$BACKGROUND.sh"
# [[ -s $BASE16_SHELL ]] && source $BASE16_SHELL
source $BASE16_SHELL