From 4244d047a08dad6f60a49866e7b605df9214c276 Mon Sep 17 00:00:00 2001 From: Richard Ziegler Date: Mon, 8 Mar 2021 12:02:17 -0500 Subject: [PATCH] prevent icon conflict wrt docker icons and add more fun options to the config --- config/p10k-classic.zsh | 2 ++ config/p10k-lean-8colors.zsh | 2 ++ config/p10k-lean.zsh | 2 ++ config/p10k-rainbow.zsh | 2 ++ internal/icons.zsh | 30 ++++++++++++++++++------------ internal/p10k.zsh | 6 +++--- 6 files changed, 29 insertions(+), 15 deletions(-) diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index f63b433b..d7331193 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1196,6 +1196,8 @@ #############[ docker: shows the whale when online, and the # running and exited containers (https://www.docker.io/) ]############# # typeset -g POWERLEVEL9K_DOCKER_ICON='🐳' # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' # typeset -g POWERLEVEL9K_DOCKER_PAUSED_ICON='' # typeset -g POWERLEVEL9K_DOCKER_EXITED_ICON='' diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index eb2fe808..4a3b57d3 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1144,6 +1144,8 @@ #############[ docker: shows the whale when online, and the # running and exited containers (https://www.docker.io/) ]############# # typeset -g POWERLEVEL9K_DOCKER_ICON='🐳' # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' # typeset -g POWERLEVEL9K_DOCKER_PAUSED_ICON='' # typeset -g POWERLEVEL9K_DOCKER_EXITED_ICON='' diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 307639a9..871eb1ef 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1140,6 +1140,8 @@ #############[ docker: shows the whale when online, and the # running and exited containers (https://www.docker.io/) ]############# # typeset -g POWERLEVEL9K_DOCKER_ICON='🐳' # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' # typeset -g POWERLEVEL9K_DOCKER_PAUSED_ICON='' # typeset -g POWERLEVEL9K_DOCKER_EXITED_ICON='' diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 2684bbab..3b0e4545 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1262,6 +1262,8 @@ #############[ docker: shows the whale when online, and the # running and exited containers (https://www.docker.io/) ]############# # typeset -g POWERLEVEL9K_DOCKER_ICON='🐳' # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' + # typeset -g POWERLEVEL9K_DOCKER_RUNNING_ICON='' # typeset -g POWERLEVEL9K_DOCKER_PAUSED_ICON='' # typeset -g POWERLEVEL9K_DOCKER_EXITED_ICON='' diff --git a/internal/icons.zsh b/internal/icons.zsh index 04705319..3abf3aca 100644 --- a/internal/icons.zsh +++ b/internal/icons.zsh @@ -145,8 +145,9 @@ function _p9k_init_icons() { JULIA_ICON 'jl' SCALA_ICON 'scala' DOCKER_ICON '\UE7B0' - ONLINE_ICON '\UF674' - PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_ONLINE_ICON '\UF674' + DOCKER_CONTAINER_PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_EXIT_ICON '\UF00D' ) ;; 'awesome-fontconfig') @@ -276,8 +277,9 @@ function _p9k_init_icons() { JULIA_ICON 'jl' SCALA_ICON 'scala' DOCKER_ICON '\UE7B0' - ONLINE_ICON '\UF674' - PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_ONLINE_ICON '\UF674' + DOCKER_CONTAINER_PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_EXIT_ICON '\UF00D' ) ;; 'awesome-mapped-fontconfig') @@ -410,8 +412,9 @@ function _p9k_init_icons() { JULIA_ICON 'jl' SCALA_ICON 'scala' DOCKER_ICON '\UE7B0' - ONLINE_ICON '\UF674' - PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_ONLINE_ICON '\UF674' + DOCKER_CONTAINER_PAUSE_ICON '\UF04C' + DOCKER_CONTAINER_EXIT_ICON '\UF00D' ) ;; 'nerdfont-complete'|'nerdfont-fontconfig') @@ -542,8 +545,9 @@ function _p9k_init_icons() { JULIA_ICON '\uE624' #  SCALA_ICON '\uE737' #  DOCKER_ICON '\UE7B0' #  - ONLINE_ICON '\UF674' #  - PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_ONLINE_ICON '\UF674' #  + DOCKER_CONTAINER_PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_EXIT_ICON '\UF00D' #  ) ;; ascii) @@ -671,8 +675,9 @@ function _p9k_init_icons() { JULIA_ICON 'jl' SCALA_ICON 'scala' DOCKER_ICON 'docker' - ONLINE_ICON 'o' - PAUSE_ICON '"' + DOCKER_CONTAINER_ONLINE_ICON 'o' + DOCKER_CONTAINER_PAUSE_ICON '"' + DOCKER_CONTAINER_EXIT_ICON 'x' ) ;; *) @@ -802,8 +807,9 @@ function _p9k_init_icons() { JULIA_ICON 'jl' SCALA_ICON 'scala' DOCKER_ICON '\UE7B0' - ONLINE_ICON '\UF674' - PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_ONLINE_ICON '\UF674' + DOCKER_CONTAINER_PAUSE_ICON '\UF04C' #  + DOCKER_CONTAINER_EXIT_ICON '\UF00D' ) ;; esac diff --git a/internal/p10k.zsh b/internal/p10k.zsh index e8320220..3d0ab354 100644 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -1314,15 +1314,15 @@ function _p9k_prompt_docker_async() { _p9k__docker_up=1 done - _p9k_get_icon '' ONLINE_ICON + _p9k_get_icon '' DOCKER_CONTAINER_ONLINE_ICON (( ${container_status_counts[U]} )) && \ _p9k__docker_segment="%F{green}${POWERLEVEL9K_DOCKER_RUNNING_ICON:-$_p9k__ret} ${container_status_counts[U]} %f" - _p9k_get_icon '' PAUSE_ICON + _p9k_get_icon '' DOCKER_CONTAINER_PAUSE_ICON (( ${container_status_counts[P]} )) && \ _p9k__docker_segment+="%F{yellow}${POWERLEVEL9K_DOCKER_PAUSED_ICON:-$_p9k__ret} ${container_status_counts[P]} %f" - _p9k_get_icon '' FAIL_ICON + _p9k_get_icon '' DOCKER_CONTAINER_EXIT_ICON (( ${container_status_counts[E]} )) && \ _p9k__docker_segment+="%F{red}${POWERLEVEL9K_DOCKER_EXITED_ICON:-$_p9k__ret} ${container_status_counts[E]} %f"