X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/1342ae481bc727c45a7e773ec8f815177a9299f5..e8a34ec0e718448d367e677fdd88eda8c3ceaefc:/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 }