X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/4bde4b5eea6ad1352078228c0d146f41b4c893e4..b9c5e5a2cf7860edb1e1dd9df0e32350b7b9a985:/widgets/sysload.lua?ds=inline diff --git a/widgets/sysload.lua b/widgets/sysload.lua index 868398c..b15b1bf 100644 --- a/widgets/sysload.lua +++ b/widgets/sysload.lua @@ -11,7 +11,7 @@ local newtimer = require("lain.helpers").newtimer local wibox = require("wibox") -local io = io +local io = { open = io.open } local string = { format = string.format, match = string.match } @@ -30,9 +30,9 @@ local function worker(args) function update() local f = io.open("/proc/loadavg") - local ret = f:read("*all") + local ret = f:read("*a") f:close() - + load_1, load_5, load_15 = string.match(ret, "([^%s]+) ([^%s]+) ([^%s]+)") widget = sysload.widget