summaryrefslogtreecommitdiff
path: root/themes/agnoster.zsh-theme
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2018-09-10 10:50:45 -0600
committerTuowen Zhao <ztuowen@gmail.com>2018-09-10 10:50:45 -0600
commit5ece6ef2f07c58672a9c965dbbbb62a42386fb2d (patch)
tree285e6382f9e900779bce60da02f1f0d97e467e26 /themes/agnoster.zsh-theme
parent852e7fe005267f74f3c04a4ddbb310522eee8014 (diff)
parentfe5fe81c8cfa66981c51d149a35fe545f2ef5016 (diff)
downloadzsh-5ece6ef2f07c58672a9c965dbbbb62a42386fb2d.tar.gz
zsh-5ece6ef2f07c58672a9c965dbbbb62a42386fb2d.tar.bz2
zsh-5ece6ef2f07c58672a9c965dbbbb62a42386fb2d.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r--themes/agnoster.zsh-theme19
1 files changed, 14 insertions, 5 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index 6ce248417..164b0c552 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -13,9 +13,13 @@
#
# In addition, I recommend the
# [Solarized theme](https://github.com/altercation/solarized/) and, if you're
-# using it on Mac OS X, [iTerm 2](http://www.iterm2.com/) over Terminal.app -
+# using it on Mac OS X, [iTerm 2](https://iterm2.com/) over Terminal.app -
# it has significantly better color fidelity.
#
+# If using with "light" variant of the Solarized color schema, set
+# SOLARIZED_THEME variable to "light". If you don't specify, we'll assume
+# you're using the "dark" variant.
+#
# # Goals
#
# The aim of this theme is to only show you *relevant* information. Like most
@@ -30,6 +34,11 @@
CURRENT_BG='NONE'
+case ${SOLARIZED_THEME:-dark} in
+ light) CURRENT_FG='white';;
+ *) CURRENT_FG='black';;
+esac
+
# Special Powerline characters
() {
@@ -101,7 +110,7 @@ prompt_git() {
if [[ -n $dirty ]]; then
prompt_segment yellow black
else
- prompt_segment green black
+ prompt_segment green $CURRENT_FG
fi
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
@@ -164,7 +173,7 @@ prompt_hg() {
st='±'
else
# if working copy is clean
- prompt_segment green black
+ prompt_segment green $CURRENT_FG
fi
echo -n $(hg prompt "☿ {rev}@{branch}") $st
else
@@ -178,7 +187,7 @@ prompt_hg() {
prompt_segment yellow black
st='±'
else
- prompt_segment green black
+ prompt_segment green $CURRENT_FG
fi
echo -n "☿ $rev@$branch" $st
fi
@@ -187,7 +196,7 @@ prompt_hg() {
# Dir: current working directory
prompt_dir() {
- prompt_segment blue black '%~'
+ prompt_segment blue $CURRENT_FG '%~'
}
# Virtualenv: current working virtualenv