From c98a223427d39688659f39d28aceb1fbaa2a166c Mon Sep 17 00:00:00 2001 From: Arialdo Martini Date: Fri, 22 Nov 2013 18:52:52 +0100 Subject: [PATCH] Using zsh colors --- arialdo-granzestyle.zsh-theme | 25 ++++++++++++++++--------- arialdo-pathinline.zsh-theme | 24 +++++++++++++++--------- 2 files changed, 31 insertions(+), 18 deletions(-) diff --git a/arialdo-granzestyle.zsh-theme b/arialdo-granzestyle.zsh-theme index 1446406..0f1c730 100755 --- a/arialdo-granzestyle.zsh-theme +++ b/arialdo-granzestyle.zsh-theme @@ -27,15 +27,22 @@ : ${use_color_off:=false} -# Colors -: ${on='\033[0;37m'} -: ${off='\033[1;30m'} -: ${red='\033[0;31m'} -: ${green='\033[0;32m'} -: ${yellow='\033[0;33m'} -: ${violet='\033[0;35m'} -: ${branch_color='\033[0;34m'} -: ${reset=''} +#load colors +autoload colors && colors +for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do + eval $COLOR='%{$fg_no_bold[${(L)COLOR}]%}' #wrap colours between %{ %} to avoid weird gaps in autocomplete + eval BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}' +done +eval RESET='%{$reset_color%}' + +on=$WHITE +off=$WHITE +red=$RED +green=$GREEN +yellow=$YELLOW +violet=$CYAN +branch_color=$BLUE +reset=$RESET PROMPT='$(build_prompt)%{$fg_bold[green]%}%~ diff --git a/arialdo-pathinline.zsh-theme b/arialdo-pathinline.zsh-theme index 6f212e1..ae0f4e5 100755 --- a/arialdo-pathinline.zsh-theme +++ b/arialdo-pathinline.zsh-theme @@ -27,16 +27,22 @@ : ${use_color_off:=false} -# Colors -: ${on='\033[0;37m'} -: ${off='\033[1;30m'} -: ${red='\033[0;31m'} -: ${green='\033[0;32m'} -: ${yellow='\033[0;33m'} -: ${violet='\033[0;35m'} -: ${branch_color='\033[0;34m'} -: ${reset=''} +#load colors +autoload colors && colors +for COLOR in RED GREEN YELLOW BLUE MAGENTA CYAN BLACK WHITE; do + eval $COLOR='%{$fg_no_bold[${(L)COLOR}]%}' #wrap colours between %{ %} to avoid weird gaps in autocomplete + eval BOLD_$COLOR='%{$fg_bold[${(L)COLOR}]%}' +done +eval RESET='%{$reset_color%}' +on=$WHITE +off=$WHITE +red=$RED +green=$GREEN +yellow=$YELLOW +violet=$CYAN +branch_color=$BLUE +reset=$RESET PROMPT='$(build_prompt)%{$fg_bold[green]%} %~%{$fg_bold[white]%} ∙ '