aboutsummaryrefslogtreecommitdiff
path: root/config/p10k-lean-8colors.zsh
diff options
context:
space:
mode:
authorromkatv <roman.perepelitsa@gmail.com>2020-02-03 13:47:55 +0300
committerromkatv <roman.perepelitsa@gmail.com>2020-02-03 13:47:55 +0300
commit71f4eade9f5f7edc67fed77c9de2ef9a70b0d87a (patch)
tree925f9633a06be106ef96c526bf33c6a2009101d1 /config/p10k-lean-8colors.zsh
parent4b62cd7380b55115f5f7e184484c9b8081f2f1a7 (diff)
add wifi prompt segment
Diffstat (limited to 'config/p10k-lean-8colors.zsh')
-rw-r--r--config/p10k-lean-8colors.zsh31
1 files changed, 31 insertions, 0 deletions
diff --git a/config/p10k-lean-8colors.zsh b/config/p10k-lean-8colors.zsh
index ccfe6d65..2897b554 100644
--- a/config/p10k-lean-8colors.zsh
+++ b/config/p10k-lean-8colors.zsh
@@ -92,6 +92,7 @@
# public_ip # public IP address
# proxy # system-wide http/https/ftp proxy
# battery # internal battery
+ # wifi # wifi speed
# example # example user-defined segment (see prompt_example function below)
)
@@ -1088,6 +1089,36 @@
# Don't show the remaining time to charge/discharge.
typeset -g POWERLEVEL9K_BATTERY_VERBOSE=false
+ #####################################[ wifi: wifi speed ]#####################################
+ # WiFi color.
+ typeset -g POWERLEVEL9K_WIFI_FOREGROUND=4
+ # Custom icon.
+ # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='⭐'
+
+ # Use different colors and icons depending on signal strength ($P9K_WIFI_BARS).
+ #
+ # # Wifi colors and icons for different signal strength levels (low to high).
+ # typeset -g my_wifi_fg=(4 4 4 4 4) # <-- change these values
+ # typeset -g my_wifi_icon=('WiFi' 'WiFi' 'WiFi' 'WiFi' 'WiFi') # <-- change these values
+ #
+ # typeset -g POWERLEVEL9K_WIFI_CONTENT_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}$P9K_WIFI_LAST_TX_RATE Mbps'
+ # typeset -g POWERLEVEL9K_WIFI_VISUAL_IDENTIFIER_EXPANSION='%F{${my_wifi_fg[P9K_WIFI_BARS+1]}}${my_wifi_icon[P9K_WIFI_BARS+1]}'
+ #
+ # The following parameters are accessible within the expansions:
+ #
+ # Parameter | Meaning
+ # ----------------------+---------------
+ # P9K_WIFI_SSID | service set identifier, a.k.a. network name
+ # P9K_WIFI_LINK_AUTH | authentication protocol
+ # P9K_WIFI_LAST_TX_RATE | wireless transmit rate in megabits per second
+ # P9K_WIFI_RSSI | signal strength in dBm, from -120 to 0
+ # P9K_WIFI_NOISE | noise in dBm, from -120 to 0
+ # P9K_WIFI_BARS | signal strength in bars, from 0 to 4 (derived from P9K_WIFI_RSSI and P9K_WIFI_NOISE)
+ #
+ # All parameters except P9K_WIFI_BARS are extracted from the output of the following command:
+ #
+ # /System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I
+
####################################[ time: current time ]####################################
# Current time color.
typeset -g POWERLEVEL9K_TIME_FOREGROUND=6