mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-02-20 03:02:29 +01:00
commit
ac4d4a4e94
1 changed files with 34 additions and 0 deletions
34
themes/my.zsh-theme
Normal file
34
themes/my.zsh-theme
Normal file
|
|
@ -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%}%'
|
||||
Loading…
Add table
Add a link
Reference in a new issue