diff --git a/scripts/sync.sh b/scripts/sync.sh index 7708c5b..672a114 100755 --- a/scripts/sync.sh +++ b/scripts/sync.sh @@ -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 diff --git a/shells/af-magic.zsh-theme b/shells/af-magic.zsh-theme index 3e767bc..d0e7bb9 100644 --- a/shells/af-magic.zsh-theme +++ b/shells/af-magic.zsh-theme @@ -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%}%'