aboutsummaryrefslogtreecommitdiffstats
path: root/.zshrc
diff options
context:
space:
mode:
authorkatherine <shmibs@shmibbles.me>2017-03-07 13:41:52 -0700
committerkatherine <shmibs@shmibbles.me>2017-03-07 13:41:52 -0700
commit9676f43ffad81ac477ae3989e6b2b1e129f85d98 (patch)
treec08eca44c160f69d5e221ce415e559e0bb265762 /.zshrc
parent5aba9de367932be46aa471c71076d9e623d5abce (diff)
downloaddotfiles-9676f43ffad81ac477ae3989e6b2b1e129f85d98.tar.gz
preliminary support for light backgrounds
haven't managed to make one that felt ok yet, but still nice to have the option
Diffstat (limited to '.zshrc')
-rw-r--r--.zshrc25
1 files changed, 25 insertions, 0 deletions
diff --git a/.zshrc b/.zshrc
index 41a9c2a..2a0964c 100644
--- a/.zshrc
+++ b/.zshrc
@@ -20,6 +20,15 @@ bindkey -e
setopt notify
unsetopt beep
+if [[ "$TERM" == "rxvt-unicode-256color" ]]; then
+ if [[ -f "$HOME/.config/init/vars" ]]; then
+ source "$HOME/.config/init/vars"
+ else
+ [[ -f "/home/shmibs/.config/init/vars" ]] &&
+ source "/home/shmibs/.config/init/vars"
+ fi
+fi
+
##################### MISC ####################
# dynamic title
@@ -36,6 +45,21 @@ if [[ "$TERM" == "rxvt-unicode-256color" ]]; then
fi
#################### PROMPT ###################
+if [[ -n $light_colours ]]; then
+PROMPT="%{$fg[black]%}┌["
+# if non-zero, previous return val
+PROMPT+="%(0?..$fg[red]%?$fg[black]:)"
+# if any, number of jobs
+PROMPT+="%(1j.$fg[green]%j$fg[black]:.)"
+# name and host (red for root)
+PROMPT+="%{%(!.$fg[red].$fg[magenta])%}%n@%M%E "
+# current location, with one level of parent context
+PROMPT+="%{$fg[blue]%}%2c"
+# newline
+PROMPT+="%{$fg[black]%}]%{%b$reset_color%}
+"
+PROMPT+="%{$fg[black]%}└: %{%b$reset_color%}"
+else
PROMPT="%{%B$fg[white]%}┌["
# if non-zero, previous return val
PROMPT+="%(0?..$fg[red]%?$fg[white]:)"
@@ -49,6 +73,7 @@ PROMPT+="%{$fg[blue]%}%2c"
PROMPT+="%{$fg[white]%}]%{%b$reset_color%}
"
PROMPT+="%{%B$fg[white]%}└: %{%b$reset_color%}"
+fi
################# HIGHLIGHTING ################