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

Wi-fi speed icon not showing up after updating to Sonoma 14.4 #2595

Open
Antho1641 opened this issue Mar 8, 2024 · 5 comments
Open

Wi-fi speed icon not showing up after updating to Sonoma 14.4 #2595

Antho1641 opened this issue Mar 8, 2024 · 5 comments

Comments

@Antho1641
Copy link

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?

@romkatv
Copy link
Owner

romkatv commented Mar 8, 2024

Let me upgrade my mac and see if I can reproduce this.

@jcostom
Copy link

jcostom commented Mar 8, 2024

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
)

@romkatv
Copy link
Owner

romkatv commented Mar 8, 2024

Powerlevel10k uses airport to retrieve the state of the wi-fi on macOS:

if [[ -x $airport ]]; then
out="$($airport -I)" || return 0
for line in ${${${(f)out}##[[:space:]]#}%%[[:space:]]#}; do
v=${line#*: }
case $line[1,-$#v-3] in
agrCtlRSSI) rssi=$v;;
agrCtlNoise) noise=$v;;
state) state=$v;;
lastTxRate) last_tx_rate=$v;;
link\ auth) link_auth=$v;;
SSID) ssid=$v;;
esac
done
[[ $state == running && $rssi == (0|-<->) && $noise == (0|-<->) ]] || return 0

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.

@Antho1641
Copy link
Author

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.

@rwmitchell
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants