From 1885d15da284f43e3efe0525ef5c83cc84449460 Mon Sep 17 00:00:00 2001 From: romkatv Date: Mon, 24 Feb 2020 12:15:58 +0100 Subject: set P9K_IP_TX_RATE and P9K_IP_RX_RATE to empty instead of 0 when unable to get the real values --- config/p10k-classic.zsh | 2 +- config/p10k-lean-8colors.zsh | 2 +- config/p10k-lean.zsh | 2 +- config/p10k-rainbow.zsh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) (limited to 'config') diff --git a/config/p10k-classic.zsh b/config/p10k-classic.zsh index 2f9c791d..d8c8ee02 100644 --- a/config/p10k-classic.zsh +++ b/config/p10k-classic.zsh @@ -1320,7 +1320,7 @@ # P9K_IP_TX_BYTES | total number of bytes sent # P9K_IP_RX_RATE | receive rate (since last prompt) # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='%70F⇣$P9K_IP_RX_RATE %215F⇡$P9K_IP_TX_RATE %38F$P9K_IP_IP' + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+%70F⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+%215F⇡$P9K_IP_TX_RATE }%38F$P9K_IP_IP' # Show information for the first network interface whose name matches this regular expression. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh index 96edf071..77c8b438 100644 --- a/config/p10k-lean-8colors.zsh +++ b/config/p10k-lean-8colors.zsh @@ -1299,7 +1299,7 @@ # P9K_IP_TX_BYTES | total number of bytes sent # P9K_IP_RX_RATE | receive rate (since last prompt) # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP %2F⇣$P9K_IP_RX_RATE %3F⇡$P9K_IP_TX_RATE' + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %2F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %3F⇡$P9K_IP_TX_RATE}' # Show information for the first network interface whose name matches this regular expression. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' diff --git a/config/p10k-lean.zsh b/config/p10k-lean.zsh index 57965ba7..d6b755ec 100644 --- a/config/p10k-lean.zsh +++ b/config/p10k-lean.zsh @@ -1299,7 +1299,7 @@ # P9K_IP_TX_BYTES | total number of bytes sent # P9K_IP_RX_RATE | receive rate (since last prompt) # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP %70F⇣$P9K_IP_RX_RATE %215F⇡$P9K_IP_TX_RATE' + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='$P9K_IP_IP${P9K_IP_RX_RATE:+ %70F⇣$P9K_IP_RX_RATE}${P9K_IP_TX_RATE:+ %215F⇡$P9K_IP_TX_RATE}' # Show information for the first network interface whose name matches this regular expression. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' diff --git a/config/p10k-rainbow.zsh b/config/p10k-rainbow.zsh index 8fafe651..29f66a90 100644 --- a/config/p10k-rainbow.zsh +++ b/config/p10k-rainbow.zsh @@ -1383,7 +1383,7 @@ # P9K_IP_TX_BYTES | total number of bytes sent # P9K_IP_RX_RATE | receive rate (since last prompt) # P9K_IP_TX_RATE | send rate (since last prompt) - typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='⇣$P9K_IP_RX_RATE ⇡$P9K_IP_TX_RATE $P9K_IP_IP' + typeset -g POWERLEVEL9K_IP_CONTENT_EXPANSION='${P9K_IP_RX_RATE:+⇣$P9K_IP_RX_RATE }${P9K_IP_TX_RATE:+⇡$P9K_IP_TX_RATE }$P9K_IP_IP' # Show information for the first network interface whose name matches this regular expression. # Run `ifconfig` or `ip -4 a show` to see the names of all network interfaces. typeset -g POWERLEVEL9K_IP_INTERFACE='e.*' -- cgit v1.2.3