X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/0ef82f83e0baaa2936b6204a24ee3b3b638fd409..0f92560ca1dcd8ac38ef4aa6c80d95f4484c4bf8:/widgets/sysload.lua?ds=inline diff --git a/widgets/sysload.lua b/widgets/sysload.lua index 90bdedf..015573c 100644 --- a/widgets/sysload.lua +++ b/widgets/sysload.lua @@ -28,19 +28,18 @@ local function worker(args) sysload.widget = wibox.widget.textbox('') - function sysload.update() + function update() local f = io.open("/proc/loadavg") local ret = f:read("*all") f:close() - - a, b, c = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)") + + load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)") widget = sysload.widget settings() end - newtimer("sysload", timeout, sysload.update) - + newtimer("sysload", timeout, update) return sysload.widget end