Created
February 9, 2015 00:25
-
-
Save kramerc/a3cf3d0adfbbb30e3d26 to your computer and use it in GitHub Desktop.
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
# vim:ft=zsh ts=2 sw=2 sts=2 | |
# | |
# kramerc's theme | |
# Based on philips's theme. | |
prompt_context() { | |
local context user_fg | |
if [ $UID -eq 0 ]; then | |
# Root user | |
user_fg="%F{red}" | |
else | |
# Normal user | |
user_fg="%F{green}" | |
fi | |
if [[ `whoami` != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then | |
# Print the username and hostname | |
context="%{$user_fg%}%B%n%b%{$reset_color%}@%m" | |
fi | |
if [[ $context != "" ]]; then | |
# Print the context along with the separator | |
echo -n "$context:" | |
fi | |
} | |
PROMPT='$(prompt_context)%{$fg[blue]%}%B%~%b%{$reset_color%} $(git_prompt_info)%(!.#.$) ' | |
# Timestamp on the right | |
#RPROMPT='[%*]' | |
# Git theming | |
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}(%{$fg_no_bold[red]%}%B" | |
ZSH_THEME_GIT_PROMPT_SUFFIX="%b%{$fg_bold[blue]%})%{$reset_color%} " | |
ZSH_THEME_GIT_PROMPT_CLEAN="" | |
ZSH_THEME_GIT_PROMPT_DIRTY="*" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment