Awesome update 9.

master
Ambrevar 2013-01-01 11:14:37 +01:00
parent 8aa4249f5a
commit df04a05d72
1 changed files with 2 additions and 1 deletions

View File

@ -126,12 +126,13 @@ if ostype == "Linux" then
vicious.register(cpuwidget, vicious.widgets.cpu, separator .. '<span color="#CC8F52">CPU $1%</span>')
-- Net
-- CHECK: not sure if args["{".. device .." carrier}"] may have values below 0. What do values of the args table mean?
local networks = { "eth0", "wlan0" }
vicious.register(netwidget, vicious.widgets.net,
function (widget, args)
for _,device in pairs(networks) do
value = tonumber(args["{".. device .." carrier}"])
if value ~= nil and value > 0 then
if value ~= nil and value ~= 0 then
return separator .. '<span color="#CC9393">↓' .. args["{" .. device .. " down_kb}"] .. '</span> <span color="#7F9F7F">↑' .. args["{" .. device .. " up_kb}"] .. '</span>'
end
end