From b5d9a77fb36e146ab4a371f99df279ff426a9d14 Mon Sep 17 00:00:00 2001 From: Thomas FORGIONE Date: Tue, 22 Nov 2016 09:12:16 +0100 Subject: [PATCH] Green arroww when ssh --- zsh/oh-my-zsh/themes/laptop.zsh-theme | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/zsh/oh-my-zsh/themes/laptop.zsh-theme b/zsh/oh-my-zsh/themes/laptop.zsh-theme index 4e4db7d..7e8084a 100644 --- a/zsh/oh-my-zsh/themes/laptop.zsh-theme +++ b/zsh/oh-my-zsh/themes/laptop.zsh-theme @@ -15,11 +15,20 @@ eval PR_BOLD="%{$terminfo[bold]%}" # Check the UID if [[ $UID -ge 1000 ]]; then # normal user - eval PR_USER='${PR_MAGENTA}%n${PR_NO_COLOR}' - eval PR_USER_OP='${PR_BLUE}%#${PR_NO_COLOR}' - local PR_PROMPT='$PR_NO_COLOR▶$PR_NO_COLOR' - local PR_ARROW_UP='╭── ' - local PR_ARROW_DOWN='╰' + # If ssh + if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then + eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}' + eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}' + local PR_ARROW_UP='${PR_GREEN}╭── ${PR_NO_COLOR}' + local PR_ARROW_DOWN='${PR_GREEN}╰${PR_NO_COLOR}' + local PR_PROMPT='$PR_GREEN▶$PR_NO_COLOR' + else + eval PR_USER='${PR_MAGENTA}%n${PR_NO_COLOR}' + eval PR_USER_OP='${PR_BLUE}%#${PR_NO_COLOR}' + local PR_PROMPT='$PR_NO_COLOR▶$PR_NO_COLOR' + local PR_ARROW_UP='╭── ' + local PR_ARROW_DOWN='╰' + fi elif [[ $UID -eq 0 ]]; then # root eval PR_USER='${PR_RED}%n${PR_NO_COLOR}' eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'