Created
November 3, 2017 05:32
-
-
Save cojack/5179064fee1d73a2dd765f583ccb4b81 to your computer and use it in GitHub Desktop.
ZSH Theme based on bira, but modified for node and add clock at the right
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
local return_code="%(?..[%{$fg[red]%}%? ↵%{$reset_color%}]─)" | |
if [[ $UID -eq 0 ]]; then | |
local user_host='%{$terminfo[bold]$fg[red]%}%n@%m%{$reset_color%}' | |
local user_symbol='#' | |
else | |
local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' | |
local user_symbol='$' | |
fi | |
local current_dir='%{$terminfo[bold]$fg[blue]%}%~%{$reset_color%}' | |
local vm_node='' | |
if which node &> /dev/null; then | |
vm_node='%{$fg[red]%}‹$(node -v)›%{$reset_color%}' | |
fi | |
local git_branch='$(git_prompt_info)%{$reset_color%}' | |
PROMPT="╭─${user_host} ${current_dir} ${vm_node} ${git_branch} | |
╰─${return_code}%B${user_symbol}%b " | |
RPROMPT='%{$fg_bold[red]%}%*%{$reset_color%}' | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}‹" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$reset_color%}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment