From 9676f43ffad81ac477ae3989e6b2b1e129f85d98 Mon Sep 17 00:00:00 2001 From: katherine Date: Tue, 7 Mar 2017 13:41:52 -0700 Subject: preliminary support for light backgrounds haven't managed to make one that felt ok yet, but still nice to have the option --- .zshrc | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to '.zshrc') 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 ################ -- cgit v1.2.3