X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/233768f0963167af1d2621d10157cd64a87c904c..d3b5b5a94d974e678d10a8670886e17a354eede5:/widget/cpu.lua?ds=sidebyside 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 }