Merge pull request #42 from ilpianista/master

net: optional notifications
This commit is contained in:
Luke Bonham 2014-04-13 20:10:42 +02:00
commit 4c3cf3c0b7

View file

@ -44,6 +44,7 @@ local function worker(args)
local timeout = args.timeout or 2 local timeout = args.timeout or 2
local iface = args.iface or net.get_device() local iface = args.iface or net.get_device()
local units = args.units or 1024 --kb local units = args.units or 1024 --kb
local notify = args.notify or "on"
local settings = args.settings or function() end local settings = args.settings or function() end
net.widget = wibox.widget.textbox('') net.widget = wibox.widget.textbox('')
@ -76,7 +77,7 @@ local function worker(args)
net.last_t = now_t net.last_t = now_t
net.last_r = now_r net.last_r = now_r
if net_now.carrier ~= "1" if net_now.carrier ~= "1" and notify == "on"
then then
if helpers.get_map(iface) if helpers.get_map(iface)
then then