wifi: properly handle disconnects

This commit is contained in:
Adrian C. (anrxc) 2010-10-24 23:36:38 +02:00
parent 32a7be1d6d
commit 304fa336ed
1 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,11 @@ local string = {
module("vicious.widgets.wifi")
-- Initialize function tables
-- {{{ Wireless widget type
local function worker(format, warg)
if not warg then return end
-- Default values
local winfo = {
["{ssid}"] = "N/A",
["{mode}"] = "N/A",
@ -33,10 +37,6 @@ local winfo = {
["{sign}"] = 0
}
-- {{{ Wireless widget type
local function worker(format, warg)
if not warg then return end
-- Get data from iwconfig where available
local iwconfig = "/sbin/iwconfig"
local f = io.open(iwconfig, "rb")