summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorMichael Louwrens <mlouwrens@entersekt.com>2018-02-12 12:28:00 +0300
committerMichael Louwrens <mlouwrens@entersekt.com>2018-02-12 12:28:00 +0300
commit7fff5bd7a6c7c6d38c5984a1fa30571e89d14d1e (patch)
treeaab767c66dfb896e54c4303f9a7d99ad61e0a887 /powerlevel9k.zsh-theme
parent38937858736ff8a7483dbdd353c36aa190028aab (diff)
add new icons and add remote_sudo
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme15
1 files changed, 10 insertions, 5 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 2267ce64..8eb13bde 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -589,10 +589,11 @@ prompt_context() {
local current_state="DEFAULT"
typeset -AH context_states
context_states=(
- "ROOT" "yellow"
- "SUDO" "yellow"
- "DEFAULT" "yellow"
- "REMOTE" "yellow"
+ "ROOT" "yellow"
+ "SUDO" "yellow"
+ "DEFAULT" "yellow"
+ "REMOTE" "yellow"
+ "REMOTE_SUDO" "yellow"
)
local content=""
@@ -608,7 +609,11 @@ prompt_context() {
if [[ $(print -P "%#") == '#' ]]; then
current_state="ROOT"
elif [[ -n "$SSH_CLIENT" || -n "$SSH_TTY" ]]; then
- current_state="REMOTE"
+ if sudo -n true 2>/dev/null; then
+ current_state="REMOTE_SUDO"
+ else
+ current_state="REMOTE"
+ fi
elif sudo -n true 2>/dev/null; then
current_state="SUDO"
fi