diff options
author | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-10-24 23:36:38 +0200 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2010-10-24 23:36:38 +0200 |
commit | 304fa336ed385942ad41178dc9d0b15e71d1ac2f (patch) | |
tree | be70b4a8631a57f29bc605f3d1bb5d000dc66c16 /widgets/wifi.lua | |
parent | 32a7be1d6dd25eb47937789b8cb689b67d2fbb84 (diff) | |
download | vicious-legacy-304fa336ed385942ad41178dc9d0b15e71d1ac2f.tar.xz |
wifi: properly handle disconnects
Diffstat (limited to 'widgets/wifi.lua')
-rw-r--r-- | widgets/wifi.lua | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/widgets/wifi.lua b/widgets/wifi.lua index 9e8583a..4f389d0 100644 --- a/widgets/wifi.lua +++ b/widgets/wifi.lua @@ -22,21 +22,21 @@ local string = { module("vicious.widgets.wifi") --- Initialize function tables -local winfo = { - ["{ssid}"] = "N/A", - ["{mode}"] = "N/A", - ["{chan}"] = 0, - ["{rate}"] = 0, - ["{link}"] = 0, - ["{linp}"] = 0, - ["{sign}"] = 0 -} - -- {{{ Wireless widget type local function worker(format, warg) if not warg then return end + -- Default values + local winfo = { + ["{ssid}"] = "N/A", + ["{mode}"] = "N/A", + ["{chan}"] = 0, + ["{rate}"] = 0, + ["{link}"] = 0, + ["{linp}"] = 0, + ["{sign}"] = 0 + } + -- Get data from iwconfig where available local iwconfig = "/sbin/iwconfig" local f = io.open(iwconfig, "rb") |