From 8e932233fa5b7d4ce3736ce294c17bb8b2a3e5f9 Mon Sep 17 00:00:00 2001 From: yongyu-lee Date: Mon, 20 Oct 2014 13:40:13 +0900 Subject: [PATCH] added my theme --- themes/my.zsh-theme | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 themes/my.zsh-theme diff --git a/themes/my.zsh-theme b/themes/my.zsh-theme new file mode 100644 index 000000000..ccce93529 --- /dev/null +++ b/themes/my.zsh-theme @@ -0,0 +1,34 @@ +# my.zsh-theme + +if [ $UID -eq 0 ]; then NCOLOR="red"; else NCOLOR="green"; fi + +local return_code="%(?..%{$fg[red]%}%?%{$reset_color%}:)" + +# color vars +eval my_gray='$FG[237]' +eval my_orange='$FG[214]' + +local user_host='%{$terminfo[bold]$fg[$NCOLOR]%}%n@%m%{$reset_color%}' +local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}' +local git_super_status='$(git_super_status)' + +# See if we can use extended characters to look nicer. +typeset -A altchar +set -A altchar ${(s..)terminfo[acsc]} +PR_SET_CHARSET="%{$terminfo[enacs]%}" +PR_SHIFT_IN="%{$terminfo[smacs]%}" +PR_SHIFT_OUT="%{$terminfo[rmacs]%}" +PR_HBAR=${altchar[q]:--} +PR_ULCORNER=${altchar[l]:--} +PR_LLCORNER=${altchar[m]:--} +PR_LRCORNER=${altchar[j]:--} +PR_URCORNER=${altchar[k]:--} + +# primary prompt +PROMPT="%{$my_gray%}$PR_SHIFT_IN$PR_ULCORNER$PR_HBAR$PR_SHIFT_OUT\ +${user_host} ${current_dir} ${git_super_status} +%{$my_gray%}$PR_SHIFT_IN$PR_LLCORNER$PR_HBAR$PR_SHIFT_OUT\ +%{$my_gray%}%D{(%m/%d %H:%M)}%B$%b " + +# right prompt +RPROMPT="${return_code}"'%{$my_gray%}%l%{$reset_color%}%'