Skip to content

feat: detect WiFi SSID in WSL using netsh.exe#389

Merged
ethancedwards8 merged 1 commit into
dracula:masterfrom
havorx:feat/wsl-wifi-detection
Jun 25, 2026
Merged

feat: detect WiFi SSID in WSL using netsh.exe#389
ethancedwards8 merged 1 commit into
dracula:masterfrom
havorx:feat/wsl-wifi-detection

Conversation

@havorx

@havorx havorx commented Apr 17, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add WSL (Windows Subsystem for Linux) WiFi SSID detection in the network plugin
  • When running in WSL, iw dev cannot see WiFi hardware since WSL virtualizes the network interface as ethernet
  • This patch detects the WSL environment via /proc/version and queries the Windows host's WiFi SSID using netsh.exe

Changes

  • scripts/network.sh: Added WSL detection in the Linux case of get_ssid() — if /proc/version contains "microsoft" and netsh.exe is available, it uses netsh.exe wlan show interfaces to get the SSID. Falls back to the existing iw dev logic otherwise.

Testing

Tested on WSL2 Ubuntu. WiFi SSID is correctly detected and displayed with the wifi label. Non-WSL Linux behavior is unchanged (falls through to iw dev).

@havorx

havorx commented May 7, 2026

Copy link
Copy Markdown
Contributor Author

@ethancedwards8 is this PR ready to merge ?

@ethancedwards8 ethancedwards8 merged commit b30fe90 into dracula:master Jun 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants