summaryrefslogtreecommitdiff
path: root/themes/agnoster.zsh-theme
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@suse.com>2018-08-19 22:28:37 +0200
committerMarc Cornellà <marc.cornella@live.com>2018-08-19 22:28:37 +0200
commite4d2d27af4ba10ae456b5676f3b70573b01d9538 (patch)
treeea90a58d1764c3a98c637c8256740a65bd86ceb4 /themes/agnoster.zsh-theme
parentdc948826b21470081c7d6b8dd22ceee45ce96c7c (diff)
downloadzsh-e4d2d27af4ba10ae456b5676f3b70573b01d9538.tar.gz
zsh-e4d2d27af4ba10ae456b5676f3b70573b01d9538.tar.bz2
zsh-e4d2d27af4ba10ae456b5676f3b70573b01d9538.zip
Agnoster: solarized light variant (#4680)
* agnoster: do not hardcode black foreground. This would allow easy customization when using light color schemes, like solarized-light * agnoster: implement light theme variant Use same variable as in blinks theme, to detect if solarized theme used is a light or dark one.
Diffstat (limited to 'themes/agnoster.zsh-theme')
-rw-r--r--themes/agnoster.zsh-theme17
1 files changed, 13 insertions, 4 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
index d91f98735..d1a69c560 100644
--- a/themes/agnoster.zsh-theme
+++ b/themes/agnoster.zsh-theme
@@ -16,6 +16,10 @@
# 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