X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/f7aa28919588d307083b4b5b1c010f26cbc63cde..b9c5e5a2cf7860edb1e1dd9df0e32350b7b9a985:/widgets/sysload.lua?ds=inline diff --git a/widgets/sysload.lua b/widgets/sysload.lua index 015573c..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,7 +30,7 @@ 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]+)")