If you’re one for visiting coffee shops and other places with public networks, you might have an interest in today’s Hammerspoon tip.
This little code added to your config file will display the name (SSID) of the currently connected Wifi network in your menu bar. Whenever the Wifi network changes, the name will automatically update so you can always see at a glance that you’re connected to the Wifi network that you think you are.
Playing around with that unusually long number (between 2147483644 and …647) will move the SSID name along the icon bar. Set it to the default ‘1000’ if you want macOS to decide where it should be.
wifiWatcher = nil
local wifiName = hs.wifi.currentNetwork()
if wifiName then
wifiMenu = hs.menubar.newWithPriority(2147483645)
wifiWatcher = hs.wifi.watcher.new(ssidChanged):start()