RPS1 is white if root, fixed oh-my-zsh syncing

This commit is contained in:
Austen Adler 2014-08-23 22:31:20 -04:00
parent 26896bff57
commit c7fe4d5e76
2 changed files with 5 additions and 5 deletions

View File

@ -72,11 +72,11 @@ while getopts ":hbsdtclw" VALUE "$@"; do
ln -s ${PWD}/../vimperator/quickmarks ~/.vimperator/info/sync/quickmarks
ln -s ${PWD}/../git/gitconfig ~/.gitconfig
ln -s ${PWD}/../shells/bashrc ~/.bashrc
ln -s ${PWD}/../shells/zshrc ~/.zshrc
ln -s ${PWD}/../shells/af-magic.zsh-theme ~/.oh-my-zsh/themes/af-magic.zsh-theme
if [ -d "~/.oh-my-zsh" ] ; then
if [ ! -f ~/.oh-my-zsh/oh-my-zsh.sh ] ; then
curl -L http://install.ohmyz.sh | sh
fi
ln -s ${PWD}/../shells/zshrc ~/.zshrc
ln -s ${PWD}/../shells/af-magic.zsh-theme ~/.oh-my-zsh/themes/af-magic.zsh-theme
mkdir -p ~/.i3
ln -s ${PWD}/../i3/config ~/.i3/config
ln -s ${PWD}/../i3/sleep.sh ~/.i3/sleep.sh

View File

@ -25,13 +25,13 @@ eval my_orange='$FG[214]'
# right prompt
if type "virtualenv_prompt_info" > /dev/null
then
if [ -z "$SSH_TTY" ] && [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ] ; then
if [[ $EUID -ne 0 ]] && [ -z "$SSH_TTY" ] && [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ]; then
RPROMPT='$(virtualenv_prompt_info)$my_gray%n@%m%{$reset_color%}%'
else
RPROMPT='$(virtualenv_prompt_info)$my_red%n@%m%{$reset_color%}%'
fi
else
if [ -z "$SSH_TTY" ] && [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ] ; then
if [[ $EUID -ne 0 ]] && [ -z "$SSH_TTY" ] && [ -z "$SSH_CONNECTION" ] && [ -z "$SSH_CLIENT" ]; then
RPROMPT='$my_gray%n@%m%{$reset_color%}%'
else
RPROMPT='$my_red%n@%m%{$reset_color%}%'