X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/e73a70c2ab26caf981d356756d4f83ad8bfbdb5a..a8eb652fd64299d64c9e831544263eabac0476ab:/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