Commit e4d2d27a authored by Frederic Crozat's avatar Frederic Crozat Committed by Marc Cornellà
Browse files

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.
parent dc948826
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment