Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added async docker segment to display number of running, paused and … #1290

Open
wants to merge 12 commits into
base: master
Choose a base branch
from
Open
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -297,6 +297,7 @@ enable as many segments as you like. It won't slow down your prompt or Zsh start
| `laravel_version` | [laravel php framework](https://laravel.com/) version |
| `java_version` | [java](https://www.java.com/) version |
| `package` | `name@version` from [package.json](https://docs.npmjs.com/files/package.json) |
| `docker` | current number of running and exited [docker](https://docker.io/) containers |
| `kubecontext` | current [kubernetes](https://kubernetes.io/) context |
| `terraform` | [terraform](https://www.terraform.io) workspace |
| `aws` | [aws profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) |
Expand Down
16 changes: 16 additions & 0 deletions config/p10k-classic.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
# battery # internal battery
# wifi # wifi speed
# example # example user-defined segment (see prompt_example function below)
# docker # Docker containers running and exited (https://www.docker.io)
)

# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
Expand Down Expand Up @@ -274,6 +275,13 @@
# the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false

# If POWERLEVEL9K_DIR_HYPERLINK is true and using WSL, then set this to make the links work:
# You must also map this drive letter on the windows side:
# ```
# net use L: \\wsl$\Ubuntu-20.04 /persistent:yes
# ```
# typeset -g POWERLEVEL9K_WSL_NETWORK_DRIVE=L:

# Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
# and POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
Expand Down Expand Up @@ -1192,6 +1200,14 @@
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_FOREGROUND=38
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'

#############[ 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_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_PAUSE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_EXIT_ICON=''

#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
Expand Down
16 changes: 16 additions & 0 deletions config/p10k-lean-8colors.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
# battery # internal battery
# wifi # wifi speed
# example # example user-defined segment (see prompt_example function below)
# docker # Docker containers running and exited (https://www.docker.io)
)

# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
Expand Down Expand Up @@ -268,6 +269,13 @@
# the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false

# If POWERLEVEL9K_DIR_HYPERLINK is true and using WSL, then set this to make the links work:
# You must also map this drive letter on the windows side:
# ```
# net use L: \\wsl$\Ubuntu-20.04 /persistent:yes
# ```
# typeset -g POWERLEVEL9K_WSL_NETWORK_DRIVE=L:

# Enable special styling for non-writable directories. See POWERLEVEL9K_LOCK_ICON and
# POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v2
Expand Down Expand Up @@ -1140,6 +1148,14 @@
# Custom icon.
# typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'

#############[ 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_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_PAUSE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_EXIT_ICON=''

#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
Expand Down
16 changes: 16 additions & 0 deletions config/p10k-lean.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,7 @@
# battery # internal battery
# wifi # wifi speed
# example # example user-defined segment (see prompt_example function below)
# docker # Docker containers running and exited (https://www.docker.io)
)

# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
Expand Down Expand Up @@ -268,6 +269,13 @@
# the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false

# If POWERLEVEL9K_DIR_HYPERLINK is true and using WSL, then set this to make the links work:
# You must also map this drive letter on the windows side:
# ```
# net use L: \\wsl$\Ubuntu-20.04 /persistent:yes
# ```
# typeset -g POWERLEVEL9K_WSL_NETWORK_DRIVE=L:

# Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
# and POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
Expand Down Expand Up @@ -1136,6 +1144,14 @@
# Custom icon.
# typeset -g POWERLEVEL9K_HASKELL_STACK_VISUAL_IDENTIFIER_EXPANSION='⭐'

#############[ 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_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_PAUSE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_EXIT_ICON=''

#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
Expand Down
22 changes: 22 additions & 0 deletions config/p10k-rainbow.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@
# battery # internal battery
# wifi # wifi speed
# example # example user-defined segment (see prompt_example function below)
# docker # Docker containers running and exited (https://www.docker.io)
)

# Defines character set used by powerlevel10k. It's best to let `p10k configure` set it for you.
Expand Down Expand Up @@ -274,6 +275,13 @@
# the full directory that was used in previous commands.
typeset -g POWERLEVEL9K_DIR_HYPERLINK=false

# If POWERLEVEL9K_DIR_HYPERLINK is true and using WSL, then set this to make the links work:
# You must also map this drive letter on the windows side:
# ```
# net use L: \\wsl$\Ubuntu-20.04 /persistent:yes
# ```
# typeset -g POWERLEVEL9K_WSL_NETWORK_DRIVE=L:

# Enable special styling for non-writable and non-existent directories. See POWERLEVEL9K_LOCK_ICON
# and POWERLEVEL9K_DIR_CLASSES below.
typeset -g POWERLEVEL9K_DIR_SHOW_WRITABLE=v3
Expand Down Expand Up @@ -1258,6 +1266,20 @@
typeset -g POWERLEVEL9K_TERRAFORM_OTHER_BACKGROUND=0
# typeset -g POWERLEVEL9K_TERRAFORM_OTHER_VISUAL_IDENTIFIER_EXPANSION='⭐'

#############[ 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_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_PAUSE_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_EXIT_ICON=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_VISUAL_IDENTIFIER_EXPANSION=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_VISUAL_IDENTIFIER_EXPANSION=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_ONLINE_VISUAL_IDENTIFIER_EXPANSION=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_PAUSE_VISUAL_IDENTIFIER_EXPANSION=''
# typeset -g POWERLEVEL9K_DOCKER_CONTAINER_EXIT_VISUAL_IDENTIFIER_EXPANSION=''
# typeset -g POWERLEVEL9K_DOCKER_CONTENT_EXPANSION='${DOCKER_ONLINE_CONTENT_EXPANSION}${DOCKER_PAUSE_CONTENT_EXPANSION}${DOCKER_EXIT_CONTENT_EXPANSION}'

#############[ kubecontext: current kubernetes context (https://kubernetes.io/) ]#############
# Show kubecontext only when the the command you are typing invokes one of these tools.
# Tip: Remove the next line to always show kubecontext.
Expand Down
42 changes: 42 additions & 0 deletions internal/icons.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ function _p9k_init_icons() {
ANDROID_ICON '\uE270'$s # 
LINUX_ICON '\uE271'$s # 
LINUX_ARCH_ICON '\uE271'$s # 
LINUX_KALI_ICON '\uE271'$s # 
LINUX_DEBIAN_ICON '\uE271'$s # 
LINUX_RASPBIAN_ICON '\uE271'$s # 
LINUX_UBUNTU_ICON '\uE271'$s # 
Expand Down Expand Up @@ -97,6 +98,8 @@ function _p9k_init_icons() {
VCS_LOADING_ICON ''
VCS_GIT_ICON '\uE20E ' # 
VCS_GIT_GITHUB_ICON '\uE20E ' #
VCS_GIT_GITHUB2_ICON '\uE20E ' #
VCS_GIT_GITHUB3_ICON '\uE20E ' #
VCS_GIT_BITBUCKET_ICON '\uE20E ' #
VCS_GIT_GITLAB_ICON '\uE20E ' #
VCS_HG_ICON '\uE1C3 ' # 
Expand Down Expand Up @@ -144,6 +147,10 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
DOCKER_ICON '\UE7B0'
DOCKER_CONTAINER_ONLINE_ICON '\UF674'
DOCKER_CONTAINER_PAUSE_ICON '\UF04C' # 
DOCKER_CONTAINER_EXIT_ICON '\UF00D'
)
;;
'awesome-fontconfig')
Expand Down Expand Up @@ -181,6 +188,7 @@ function _p9k_init_icons() {
ANDROID_ICON '\uE17B'$s #  (doesn't always work)
LINUX_ICON '\uF17C'$s # 
LINUX_ARCH_ICON '\uF17C'$s # 
LINUX_KALI_ICON '\u327F'$s # ㉿
LINUX_DEBIAN_ICON '\uF17C'$s # 
LINUX_RASPBIAN_ICON '\uF17C'$s # 
LINUX_UBUNTU_ICON '\uF17C'$s # 
Expand Down Expand Up @@ -225,6 +233,8 @@ function _p9k_init_icons() {
VCS_LOADING_ICON ''
VCS_GIT_ICON '\uF1D3 ' # 
VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_GITHUB2_ICON '\uF09B ' # 
VCS_GIT_GITHUB3_ICON '\uF092 ' # 
VCS_GIT_BITBUCKET_ICON '\uF171 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' # 
VCS_HG_ICON '\uF0C3 ' # 
Expand Down Expand Up @@ -272,6 +282,10 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
DOCKER_ICON '\UE7B0'
DOCKER_CONTAINER_ONLINE_ICON '\UF674'
DOCKER_CONTAINER_PAUSE_ICON '\UF04C' # 
DOCKER_CONTAINER_EXIT_ICON '\UF00D'
)
;;
'awesome-mapped-fontconfig')
Expand Down Expand Up @@ -314,6 +328,7 @@ function _p9k_init_icons() {
FREEBSD_ICON '\U1F608'$q # 😈
LINUX_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_ARCH_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_KALI_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_DEBIAN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_RASPBIAN_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
LINUX_UBUNTU_ICON "${CODEPOINT_OF_AWESOME_LINUX:+\\u$CODEPOINT_OF_AWESOME_LINUX$s}"
Expand Down Expand Up @@ -358,6 +373,8 @@ function _p9k_init_icons() {
VCS_LOADING_ICON ''
VCS_GIT_ICON "${CODEPOINT_OF_AWESOME_GIT:+\\u$CODEPOINT_OF_AWESOME_GIT }"
VCS_GIT_GITHUB_ICON "${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }"
VCS_GIT_GITHUB2_ICON "${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }"
VCS_GIT_GITHUB3_ICON "${CODEPOINT_OF_AWESOME_GITHUB_ALT:+\\u$CODEPOINT_OF_AWESOME_GITHUB_ALT }"
VCS_GIT_BITBUCKET_ICON "${CODEPOINT_OF_AWESOME_BITBUCKET:+\\u$CODEPOINT_OF_AWESOME_BITBUCKET }"
VCS_GIT_GITLAB_ICON "${CODEPOINT_OF_AWESOME_GITLAB:+\\u$CODEPOINT_OF_AWESOME_GITLAB }"
VCS_HG_ICON "${CODEPOINT_OF_AWESOME_FLASK:+\\u$CODEPOINT_OF_AWESOME_FLASK }"
Expand Down Expand Up @@ -403,6 +420,10 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
DOCKER_ICON '\UE7B0'
DOCKER_CONTAINER_ONLINE_ICON '\UF674'
DOCKER_CONTAINER_PAUSE_ICON '\UF04C'
DOCKER_CONTAINER_EXIT_ICON '\UF00D'
)
;;
'nerdfont-complete'|'nerdfont-fontconfig')
Expand Down Expand Up @@ -440,6 +461,7 @@ function _p9k_init_icons() {
FREEBSD_ICON '\UF30C ' # 
ANDROID_ICON '\uF17B' # 
LINUX_ARCH_ICON '\uF303' # 
LINUX_KALI_ICON '\u327F'$s # ㉿
LINUX_CENTOS_ICON '\uF304'$s # 
LINUX_COREOS_ICON '\uF305'$s # 
LINUX_DEBIAN_ICON '\uF306' # 
Expand Down Expand Up @@ -485,6 +507,8 @@ function _p9k_init_icons() {
VCS_LOADING_ICON ''
VCS_GIT_ICON '\uF1D3 ' # 
VCS_GIT_GITHUB_ICON '\uF113 ' # 
VCS_GIT_GITHUB2_ICON '\uF09B ' # 
VCS_GIT_GITHUB3_ICON '\uF092 ' # 
VCS_GIT_BITBUCKET_ICON '\uE703 ' # 
VCS_GIT_GITLAB_ICON '\uF296 ' # 
VCS_HG_ICON '\uF0C3 ' # 
Expand Down Expand Up @@ -532,6 +556,10 @@ function _p9k_init_icons() {
PACKAGE_ICON '\uF8D6' # 
JULIA_ICON '\uE624' # 
SCALA_ICON '\uE737' # 
DOCKER_ICON '\UE7B0' # 
DOCKER_CONTAINER_ONLINE_ICON '\UF674' # 
DOCKER_CONTAINER_PAUSE_ICON '\UF04C' # 
DOCKER_CONTAINER_EXIT_ICON '\UF00D' # 
)
;;
ascii)
Expand Down Expand Up @@ -567,6 +595,7 @@ function _p9k_init_icons() {
ANDROID_ICON 'android'
LINUX_ICON 'linux'
LINUX_ARCH_ICON 'arch'
LINUX_KALI_ICON 'kali'
LINUX_DEBIAN_ICON 'debian'
LINUX_RASPBIAN_ICON 'pi'
LINUX_UBUNTU_ICON 'ubuntu'
Expand Down Expand Up @@ -611,6 +640,8 @@ function _p9k_init_icons() {
VCS_LOADING_ICON ''
VCS_GIT_ICON ''
VCS_GIT_GITHUB_ICON ''
VCS_GIT_GITHUB2_ICON ''
VCS_GIT_GITHUB3_ICON ''
VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_ICON ''
VCS_HG_ICON ''
Expand Down Expand Up @@ -658,6 +689,10 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
DOCKER_ICON 'docker'
DOCKER_CONTAINER_ONLINE_ICON 'o'
DOCKER_CONTAINER_PAUSE_ICON '"'
DOCKER_CONTAINER_EXIT_ICON 'x'
)
;;
*)
Expand Down Expand Up @@ -695,6 +730,7 @@ function _p9k_init_icons() {
ANDROID_ICON 'And'
LINUX_ICON 'Lx'
LINUX_ARCH_ICON 'Arc'
LINUX_KALI_ICON 'Kli'
LINUX_DEBIAN_ICON 'Deb'
LINUX_RASPBIAN_ICON 'RPi'
LINUX_UBUNTU_ICON 'Ubu'
Expand Down Expand Up @@ -739,6 +775,8 @@ function _p9k_init_icons() {
VCS_LOADING_ICON ''
VCS_GIT_ICON ''
VCS_GIT_GITHUB_ICON ''
VCS_GIT_GITHUB2_ICON ''
VCS_GIT_GITHUB3_ICON ''
VCS_GIT_BITBUCKET_ICON ''
VCS_GIT_GITLAB_ICON ''
VCS_HG_ICON ''
Expand Down Expand Up @@ -786,6 +824,10 @@ function _p9k_init_icons() {
PACKAGE_ICON 'pkg'
JULIA_ICON 'jl'
SCALA_ICON 'scala'
DOCKER_ICON '\UE7B0'
DOCKER_CONTAINER_ONLINE_ICON '\UF674'
DOCKER_CONTAINER_PAUSE_ICON '\UF04C' # 
DOCKER_CONTAINER_EXIT_ICON '\UF00D'
)
;;
esac
Expand Down
Loading