X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6e43bfa5128be39efe554678f8a0670b6c0038a6..b07aad86215f84f5d17433f751ba246da364df2b:/widgets/cpu.lua diff --git a/widgets/cpu.lua b/widgets/cpu.lua index 96e0d3b..ec84101 100644 --- a/widgets/cpu.lua +++ b/widgets/cpu.lua @@ -28,7 +28,7 @@ local cpu = { local function worker(args) local args = args or {} - local timeout = args.timeout or 5 + local timeout = args.timeout or 2 local settings = args.settings or function() end cpu.widget = wibox.widget.textbox('') @@ -58,7 +58,7 @@ local function worker(args) local dactive = active - cpu.last_active local dtotal = total - cpu.last_total - cpu_noj = {} + cpu_now = {} cpu_now.usage = tostring(math.ceil((dactive / dtotal) * 100)) widget = cpu.widget