mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 12:20:09 +00:00
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.
This commit is contained in:
parent
dc948826b2
commit
e4d2d27af4
1 changed files with 13 additions and 4 deletions
|
@ -16,6 +16,10 @@
|
||||||
# using it on Mac OS X, [iTerm 2](https://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.
|
# 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
|
# # Goals
|
||||||
#
|
#
|
||||||
# The aim of this theme is to only show you *relevant* information. Like most
|
# The aim of this theme is to only show you *relevant* information. Like most
|
||||||
|
@ -30,6 +34,11 @@
|
||||||
|
|
||||||
CURRENT_BG='NONE'
|
CURRENT_BG='NONE'
|
||||||
|
|
||||||
|
case ${SOLARIZED_THEME:-dark} in
|
||||||
|
light) CURRENT_FG='white';;
|
||||||
|
*) CURRENT_FG='black';;
|
||||||
|
esac
|
||||||
|
|
||||||
# Special Powerline characters
|
# Special Powerline characters
|
||||||
|
|
||||||
() {
|
() {
|
||||||
|
@ -101,7 +110,7 @@ prompt_git() {
|
||||||
if [[ -n $dirty ]]; then
|
if [[ -n $dirty ]]; then
|
||||||
prompt_segment yellow black
|
prompt_segment yellow black
|
||||||
else
|
else
|
||||||
prompt_segment green black
|
prompt_segment green $CURRENT_FG
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
|
if [[ -e "${repo_path}/BISECT_LOG" ]]; then
|
||||||
|
@ -164,7 +173,7 @@ prompt_hg() {
|
||||||
st='±'
|
st='±'
|
||||||
else
|
else
|
||||||
# if working copy is clean
|
# if working copy is clean
|
||||||
prompt_segment green black
|
prompt_segment green $CURRENT_FG
|
||||||
fi
|
fi
|
||||||
echo -n $(hg prompt "☿ {rev}@{branch}") $st
|
echo -n $(hg prompt "☿ {rev}@{branch}") $st
|
||||||
else
|
else
|
||||||
|
@ -178,7 +187,7 @@ prompt_hg() {
|
||||||
prompt_segment yellow black
|
prompt_segment yellow black
|
||||||
st='±'
|
st='±'
|
||||||
else
|
else
|
||||||
prompt_segment green black
|
prompt_segment green $CURRENT_FG
|
||||||
fi
|
fi
|
||||||
echo -n "☿ $rev@$branch" $st
|
echo -n "☿ $rev@$branch" $st
|
||||||
fi
|
fi
|
||||||
|
@ -187,7 +196,7 @@ prompt_hg() {
|
||||||
|
|
||||||
# Dir: current working directory
|
# Dir: current working directory
|
||||||
prompt_dir() {
|
prompt_dir() {
|
||||||
prompt_segment blue black '%~'
|
prompt_segment blue $CURRENT_FG '%~'
|
||||||
}
|
}
|
||||||
|
|
||||||
# Virtualenv: current working virtualenv
|
# Virtualenv: current working virtualenv
|
||||||
|
|
Loading…
Reference in a new issue