romkatv / powerlevel10k

A Zsh theme
MIT License
46.77k stars 2.2k forks source link

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

Open Antho1641 opened 8 months ago

Antho1641 commented 8 months ago

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 commented 8 months ago

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

jcostom commented 8 months ago

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 commented 8 months ago

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.

Antho1641 commented 8 months ago

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 commented 8 months ago

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
viking1304 commented 5 months ago

If anyone knows a way to retrieve wi-fi info on macOS without superuser privileges, please share.

system_profiler SPAirPortDataType works without sudo.

chengdejerrylin commented 5 months ago

networksetup -getairportnetwork en0 has a much faster response than system_profiler, but it only provide the ssid name.

vandit2209 commented 2 months ago

@romkatv any updates for mac?... the ip shows the speed! both upload and download.... may be some internal issue for wifi function...

romkatv commented 2 months ago

I don't have any updates here. I don't intend to work on this issue.