summaryrefslogtreecommitdiff
path: root/powerlevel9k.zsh-theme
diff options
context:
space:
mode:
authorBen Hilburn <bhilburn@gmail.com>2015-12-02 00:27:42 +0300
committerBen Hilburn <bhilburn@gmail.com>2015-12-02 00:27:42 +0300
commit424f47249d22d6547d65e6cf90e137c484a056ed (patch)
treee96ecf03da109e3edab24ea29279590ccf90a795 /powerlevel9k.zsh-theme
parent3fea92369f11797077f7a92468814ab1ee0238c3 (diff)
parent0dc36ee6148d0db99e3b580a7767e4f7b8f77c87 (diff)
Merge pull request #160 from dritter/home_icon_fix
Adding Home / Folder icon for awesome font modes.
Diffstat (limited to 'powerlevel9k.zsh-theme')
-rwxr-xr-xpowerlevel9k.zsh-theme9
1 files changed, 8 insertions, 1 deletions
diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme
index 12659e5e..47d6aa06 100755
--- a/powerlevel9k.zsh-theme
+++ b/powerlevel9k.zsh-theme
@@ -320,7 +320,14 @@ prompt_dir() {
fi
- "$1_prompt_segment" "$0" "blue" "$DEFAULT_COLOR" "$(print_icon 'HOME_ICON')$current_path"
+ local current_icon=''
+ if [[ $(print -P "%~") == '~'* ]]; then
+ current_icon=$(print_icon 'HOME_ICON')
+ else
+ current_icon=$(print_icon 'FOLDER_ICON')
+ fi
+
+ "$1_prompt_segment" "$0" "blue" "$DEFAULT_COLOR" "$current_icon$current_path"
}
# GO-prompt