From bb8c20cf9e2c17b80cf84c06055a0fa48ae62b60 Mon Sep 17 00:00:00 2001 From: Jonathan Hodgson Date: Sun, 28 Oct 2018 17:12:20 +0000 Subject: [PATCH] Chanhe prompt config if in ssh shell --- shells/zsh/oh-my-zsh/promptconfig.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/shells/zsh/oh-my-zsh/promptconfig.zsh b/shells/zsh/oh-my-zsh/promptconfig.zsh index 3b688161..fe7bcc8a 100644 --- a/shells/zsh/oh-my-zsh/promptconfig.zsh +++ b/shells/zsh/oh-my-zsh/promptconfig.zsh @@ -67,8 +67,13 @@ function my_dir(){ } POWERLEVEL9K_CUSTOM_DIR="my_dir" -POWERLEVEL9K_CUSTOM_DIR_BACKGROUND="blue" -POWERLEVEL9K_CUSTOM_DIR_FOREGROUND="white" +if [ -n "$SSH_CLIENT" ] || [ -n "$SSH_TTY" ]; then + POWERLEVEL9K_CUSTOM_DIR_BACKGROUND="green" + POWERLEVEL9K_CUSTOM_DIR_FOREGROUND="black" +else + POWERLEVEL9K_CUSTOM_DIR_BACKGROUND="blue" + POWERLEVEL9K_CUSTOM_DIR_FOREGROUND="white" +fi # POWERLEVEL9K_LEFT_SEGMENT_SEPARATOR="\ue0c0" # POWERLEVEL9K_RIGHT_SEGMENT_SEPARATOR="\ue0c2"