Wi-fi speed icon not showing up after updating to Sonoma 14.4
I've checked the p10.zsh file and it's still enabled, it was showing up this morning before I updated from Ventura but now it doesn't. is there a way I can fix this? or is there some other possible issue?
Let me upgrade my mac and see if I can reproduce this.
I too am having this same issue as of macOS 14.4. Confirm that this worked as-expected in 14.3.1.
If it helps, from my .p10k.zsh file...
typeset -g POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(
# =========================[ Line #1 ]=========================
os_icon
ssh
dir
vcs
# =========================[ Line #2 ]=========================
newline
prompt_char
)
typeset -g POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(
# =========================[ Line #1 ]=========================
status
command_execution_time
background_jobs
virtualenv
context
vim_shell
vpn_ip
time
# =========================[ Line #2 ]=========================
newline
battery
wifi
)
Powerlevel10k uses airport to retrieve the state of the wi-fi on macOS: https://github.com/romkatv/powerlevel10k/blob/0cc19ac2ede35fd8accff590fa71df580dc7e109/internal/p10k.zsh#L5334-L5347
airport no longer works: it's just a stub that points to another tool -- wdutil -- as a replacement. Unfortunately, wdutil requires sudo, so powerlevel10k cannot call it.
If anyone knows a way to retrieve wi-fi info on macOS without superuser privileges, please share.
Thanks for your speedy response, despite the inconvenience from the update I've been loving the p10k theme and I appreciate the work you've put into it.
networkQuality doesn't require root, but isn't quite the same thing nor very consistent.
networkQuality -du
==== SUMMARY ====
Idle Latency: 30.500 milliseconds | 2000 RPM
🕕 17:52:20 networkQuality -du
==== SUMMARY ====
Idle Latency: 37.375 milliseconds | 1621 RPM
If anyone knows a way to retrieve wi-fi info on macOS without superuser privileges, please share.
system_profiler SPAirPortDataType works without sudo.
networksetup -getairportnetwork en0 has a much faster response than system_profiler, but it only provide the ssid name.
@romkatv any updates for mac?... the ip shows the speed! both upload and download.... may be some internal issue for wifi function...
I don't have any updates here. I don't intend to work on this issue.
I did manage to do something similar, but it takes forever to use as a prompt, so I will work on making it async later. I am accepting suggestions as well, as you can see, I simply changed the sample custom prompt:
function prompt_example() {
wifi_info=$(system_profiler SPAirPortDataType | sed -n '/Current Network Information:/,/Other Local Wi-Fi Networks:/p')
wifi_info=$(echo "$wifi_info" | sed '1d;$d')
phy_mode=$(echo "$wifi_info" | grep -i "PHY Mode" | awk -F ": " '{print $2}')
channel=$(echo "$wifi_info" | grep -i "Channel" | awk -F ": " '{print $2}')
signal_noise=$(echo "$wifi_info" | grep -i "Signal / Noise" | awk -F ": " '{print $2}')
transmit_rate=$(echo "$wifi_info" | grep -i "Transmit Rate" | awk -F ": " '{print $2}')
example="$phy_mode $channel SNR: $signal_noise Speed: $transmit_rate Mbps"
p10k segment -b 1 -f 3 -i '🛜' -t $example
# In mine it shows as "802.11ax 100 (5GHz, 160MHz) SNR: -59 dBm / -91 dBm Speed: 576 Mbps 🛜"
}
networksetup -getairportnetwork en0has a much faster response thansystem_profiler, but it only provide the ssid name.
this one didn't work for me, but networksetup -getinfo Wi-Fi did. No Signal, Noise, nor Speed, as you already mentioned.