diff --git a/README.md b/README.md index a6d8e59..fe8b1e2 100644 --- a/README.md +++ b/README.md @@ -538,7 +538,7 @@ vicious.widgets.wifi, but uses `iw` instead of `iwconfig`). Supported platforms: GNU/Linux. * Argument: the network interface, e.g. `"wlan0"` -* Returns a table with string keys: `${ssid}`, `${mode}`, `${chan}`, +* Returns a table with string keys: `${bssid}`, `${ssid}`, `${mode}`, `${chan}`, `${rate}` (Mb/s), `${freq}` (MHz), `${linp}` (link quality in percent), `${txpw}` (transmission power, in dBm) and `${sign}` (signal level, in dBm) diff --git a/widgets/wifiiw_linux.lua b/widgets/wifiiw_linux.lua index 25aebe1..48e97e2 100644 --- a/widgets/wifiiw_linux.lua +++ b/widgets/wifiiw_linux.lua @@ -26,6 +26,7 @@ function wifiiw_linux.async(format, warg, callback) local winfo = {} local function parse_link(stdout) + winfo["{bssid}"] = stdout:match"Connected to ([%x:]*)" or "N/A" winfo["{ssid}"] = stdout:match"SSID: ([^\n]*)" or "N/A" winfo["{freq}"] = tonumber(stdout:match"freq: (%d+)" or 0) winfo["{sign}"] = -- Signal level can be negative; w/o unit (dBm)