X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/3328e738bdc1223583fb98730668dfed24395dfc..025508ce835c3a83484b4d32c179347e51498e9f:/widget/cpu.lua diff --git a/widget/cpu.lua b/widget/cpu.lua index 81638c2..f4cce73 100644 --- a/widget/cpu.lua +++ b/widget/cpu.lua @@ -25,9 +25,7 @@ local function factory(args) -- Read the amount of time the CPUs have spent performing -- different kinds of work. Read the first line of /proc/stat -- which is the sum of all CPUs. - local times = helpers.lines_match("cpu","/proc/stat") - - for index,time in pairs(times) do + for index,time in pairs(helpers.lines_match("cpu","/proc/stat")) do local coreid = index - 1 local core = cpu.core[coreid] or { last_active = 0 , last_total = 0, usage = 0 }