summaryrefslogtreecommitdiff
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
parent3fea92369f11797077f7a92468814ab1ee0238c3 (diff)
parent0dc36ee6148d0db99e3b580a7767e4f7b8f77c87 (diff)
Merge pull request #160 from dritter/home_icon_fix
Adding Home / Folder icon for awesome font modes.
-rw-r--r--functions/icons.zsh3
-rwxr-xr-xpowerlevel9k.zsh-theme9
2 files changed, 11 insertions, 1 deletions
diff --git a/functions/icons.zsh b/functions/icons.zsh
index dd256b06..fcf08163 100644
--- a/functions/icons.zsh
+++ b/functions/icons.zsh
@@ -44,6 +44,7 @@ case $POWERLEVEL9K_MODE in
LINUX_ICON $'\UE271' # 
SUNOS_ICON $'\U1F31E ' # 🌞
HOME_ICON $'\UE12C ' # 
+ FOLDER_ICON $'\UE818 ' # 
NETWORK_ICON $'\UE1AD ' # 
LOAD_ICON $'\UE190 ' # 
#RAM_ICON $'\UE87D' # 
@@ -95,6 +96,7 @@ case $POWERLEVEL9K_MODE in
LINUX_ICON $'\UF17C' # 
SUNOS_ICON $'\UF185 ' # 
HOME_ICON $'\UF015 ' # 
+ FOLDER_ICON $'\UF115 ' # 
NETWORK_ICON $'\UF09E ' # 
LOAD_ICON $'\UF080 ' # 
RAM_ICON $'\UF0E4' # 
@@ -141,6 +143,7 @@ case $POWERLEVEL9K_MODE in
LINUX_ICON 'Lx'
SUNOS_ICON 'Sun'
HOME_ICON ''
+ FOLDER_ICON ''
NETWORK_ICON 'IP'
LOAD_ICON 'L'
RAM_ICON 'RAM'
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