Skip to content

lightgun-poc / lib/wifi

lib/wifi

WiFi band detection — 5 GHz is what you want for low aim jitter.

Windows reads netsh wlan show interfaces; parsing avoids locale-specific labels where possible (the "GHz" unit and the "SSID" label survive translation, the channel label is matched across common locales). Linux prefers nmcli (terse mode is locale-independent) and falls back to iw dev. Both Linux tools report the frequency in MHz, which pins the band exactly instead of inferring it from the channel number. macOS reads system_profiler SPAirPortDataType -json — the JSON keys are stable identifiers regardless of system language (the legacy airport -I tool was removed in macOS 14.4, and wdutil info needs sudo).

Interfaces

Functions

Released under the MIT License.