Merge pull request #160 from dritter/home_icon_fix

Adding Home / Folder icon for awesome font modes.
pull/22/head
Ben Hilburn 9 years ago
commit 424f47249d

@ -44,6 +44,7 @@ case $POWERLEVEL9K_MODE in
LINUX_ICON $'\UE271' #  LINUX_ICON $'\UE271' # 
SUNOS_ICON $'\U1F31E ' # 🌞 SUNOS_ICON $'\U1F31E ' # 🌞
HOME_ICON $'\UE12C ' #  HOME_ICON $'\UE12C ' # 
FOLDER_ICON $'\UE818 ' # 
NETWORK_ICON $'\UE1AD ' #  NETWORK_ICON $'\UE1AD ' # 
LOAD_ICON $'\UE190 ' #  LOAD_ICON $'\UE190 ' # 
#RAM_ICON $'\UE87D' #  #RAM_ICON $'\UE87D' # 
@ -95,6 +96,7 @@ case $POWERLEVEL9K_MODE in
LINUX_ICON $'\UF17C' #  LINUX_ICON $'\UF17C' # 
SUNOS_ICON $'\UF185 ' #  SUNOS_ICON $'\UF185 ' # 
HOME_ICON $'\UF015 ' #  HOME_ICON $'\UF015 ' # 
FOLDER_ICON $'\UF115 ' # 
NETWORK_ICON $'\UF09E ' #  NETWORK_ICON $'\UF09E ' # 
LOAD_ICON $'\UF080 ' #  LOAD_ICON $'\UF080 ' # 
RAM_ICON $'\UF0E4' #  RAM_ICON $'\UF0E4' # 
@ -141,6 +143,7 @@ case $POWERLEVEL9K_MODE in
LINUX_ICON 'Lx' LINUX_ICON 'Lx'
SUNOS_ICON 'Sun' SUNOS_ICON 'Sun'
HOME_ICON '' HOME_ICON ''
FOLDER_ICON ''
NETWORK_ICON 'IP' NETWORK_ICON 'IP'
LOAD_ICON 'L' LOAD_ICON 'L'
RAM_ICON 'RAM' RAM_ICON 'RAM'

@ -320,7 +320,14 @@ prompt_dir() {
fi 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 # GO-prompt

Loading…
Cancel
Save