mirror of
https://github.com/romkatv/powerlevel10k.git
synced 2024-11-11 00:00:06 +00:00
Merge pull request #160 from dritter/home_icon_fix
Adding Home / Folder icon for awesome font modes.
This commit is contained in:
commit
424f47249d
2 changed files with 11 additions and 1 deletions
|
@ -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'
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue