From b90a09a1078e85bcb9f15d81c50873acb23406e5 Mon Sep 17 00:00:00 2001 From: Nick Nisi Date: Mon, 5 Jan 2015 15:33:41 -0600 Subject: [PATCH] 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. --- zsh/functions.zsh | 9 +++++++++ zsh/zshrc.symlink | 9 +++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/zsh/functions.zsh b/zsh/functions.zsh index ad2f4f2..4fa729a 100644 --- a/zsh/functions.zsh +++ b/zsh/functions.zsh @@ -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! +} diff --git a/zsh/zshrc.symlink b/zsh/zshrc.symlink index f4f216f..c921843 100644 --- a/zsh/zshrc.symlink +++ b/zsh/zshrc.symlink @@ -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