Vote
Bury
6

Display current wireless network

Posted in System by matt 253 days ago
This Geeklet displays the current wireless network. I'm not sure if this is the most efficient way to do it, so if anyone else can think of a better command, let me know. It seems to take a little while to execute, so keep the refresh time quite high unless you want to cause performance problems.

Command: system_profiler SPAirPortDataType | tail -9 | head -1 | sed -e "s/://" | sed -e 's/^[ t]*//'
Font: Lucida Grande
Colour: White
Size: 18

Geeklet file(s) to download

airport.glet

Either right-click and choose "Save Linked File As..." or hold the Option key and click to download files.
If using Safari, you may have to rename the files without the extra .txt extension that is added.

Comments


Written by appi
252 days ago
The command you suggest is a bit slow, and doesn't work with all Macs (it supposes that the right info is at a fixed line in the output). I'll suggest using instead:

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport -I | awk '/ SSID/{print $2}'

Cheers,

- ap



Log in to comment or register here.