diff options
-rw-r--r-- | README.md | 2 | ||||
-rw-r--r-- | functions/icons.zsh | 6 | ||||
-rwxr-xr-x | powerlevel9k.zsh-theme | 6 |
3 files changed, 10 insertions, 4 deletions
@@ -210,11 +210,13 @@ others whole directories. | `Compatible` | `Powerline` | `Awesome Powerline` | Situation |------------|-----------|-------------------|---------------------------- | None | None | ![home icon](https://cloud.githubusercontent.com/assets/1544760/12183451/40ec4016-b58f-11e5-9b9e-74e2b2f0b8b3.png) | Within Home folder | +| None | None | ![home sub_icon](https://cloud.githubusercontent.com/assets/1544760/12369315/8a5d762c-bbf5-11e5-8a20-ca1179f48d6c.png) | Within Home sub folder | | None | None | ![folder icon](https://cloud.githubusercontent.com/assets/1544760/12183452/40f79286-b58f-11e5-9b8c-ed1343a07b08.png) | Outside of home folder | To turn off these icons you could set these variables to an empty string. POWERLEVEL9K_HOME_ICON='' + POWERLEVEL9K_HOME_SUB_ICON='' POWERLEVEL9K_FOLDER_ICON='' ##### ip diff --git a/functions/icons.zsh b/functions/icons.zsh index b8e02efd..6a9b044c 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' # + HOME_SUB_ICON $'\UE18D' # FOLDER_ICON $'\UE818' # NETWORK_ICON $'\UE1AD' # LOAD_ICON $'\UE190 ' # @@ -79,7 +80,7 @@ case $POWERLEVEL9K_MODE in RIGHT_SUBSEGMENT_SEPARATOR $'\UE0B3' # CARRIAGE_RETURN_ICON $'\U21B5' # ↵ ROOT_ICON $'\uF201' # - RUBY_ICON $'\UF247' # + RUBY_ICON $'\UF219' # AWS_ICON $'\UF296' # BACKGROUND_JOBS_ICON $'\UF013 ' # TEST_ICON $'\UF291' # @@ -96,6 +97,7 @@ case $POWERLEVEL9K_MODE in LINUX_ICON $'\UF17C' # SUNOS_ICON $'\UF185 ' # HOME_ICON $'\UF015' # + HOME_SUB_ICON $'\UF07C' # FOLDER_ICON $'\UF115' # NETWORK_ICON $'\UF09E' # LOAD_ICON $'\UF080 ' # @@ -143,6 +145,7 @@ case $POWERLEVEL9K_MODE in LINUX_ICON 'Lx' SUNOS_ICON 'Sun' HOME_ICON '' + HOME_SUB_ICON '' FOLDER_ICON '' NETWORK_ICON 'IP' LOAD_ICON 'L' @@ -202,4 +205,3 @@ get_icon_names() { echo "POWERLEVEL9K_$key: ${icons[$key]}" done } - diff --git a/powerlevel9k.zsh-theme b/powerlevel9k.zsh-theme index 3e2beff0..a79548a5 100755 --- a/powerlevel9k.zsh-theme +++ b/powerlevel9k.zsh-theme @@ -51,7 +51,7 @@ fi # If this theme is sourced as a symlink, we need to locate the true URL if [[ -L $0 ]]; then # Script is a symlink - filename="$(realpath -P $0 2>/dev/null || readlink -f $0 2>/dev/null)" + filename="$(realpath -P $0 2>/dev/null || readlink -f $0 2>/dev/null || perl -MCwd=abs_path -le 'print abs_path readlink(shift);' $0 2>/dev/null)" elif [[ -f $0 ]]; then # Script is a file filename="$0" @@ -429,8 +429,10 @@ prompt_dir() { fi local current_icon='' - if [[ $(print -P "%~") == '~'* ]]; then + if [[ $(print -P "%~") == '~' ]]; then "$1_prompt_segment" "$0_HOME" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'HOME_ICON' + elif [[ $(print -P "%~") == '~'* ]]; then + "$1_prompt_segment" "$0_HOME_SUBFOLDER" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'HOME_SUB_ICON' else "$1_prompt_segment" "$0_DEFAULT" "$2" "blue" "$DEFAULT_COLOR" "$current_path" 'FOLDER_ICON' fi |