mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-08 04:34:00 +02:00
Merge 426cd4243b into 291e96dcd0
This commit is contained in:
commit
9b7eeef0b1
1 changed files with 25 additions and 0 deletions
25
themes/hub.zsh-theme
Normal file
25
themes/hub.zsh-theme
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
# user colors
|
||||
if [ $UID -eq 0 ]; then USERCOLOR="red"; else USERCOLOR="green"; fi
|
||||
|
||||
# box name
|
||||
function box_name {
|
||||
[ -f ~/.box-name ] && cat ~/.box-name || echo $HOST
|
||||
}
|
||||
|
||||
# workdir
|
||||
local current_dir='${PWD/#$HOME/~}'
|
||||
|
||||
# return status
|
||||
local ret_status="%(?:%{$fg_bold[255]%}➤ :%{$fg_bold[red]%}➤ %s)"
|
||||
|
||||
# prompt format: \n USER MACHINE DIRECTORY \n STATUS
|
||||
PROMPT="%{$fg[$USERCOLOR]%}%n\
|
||||
%{$reset_color%}\
|
||||
%{$fg[255]%} \
|
||||
$(box_name)\
|
||||
%{$reset_color%} \
|
||||
%{$reset_color%}\
|
||||
${current_dir}\
|
||||
%{$reset_color%}
|
||||
${ret_status}\
|
||||
%{$reset_color%}"
|
||||
Loading…
Add table
Add a link
Reference in a new issue