X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/6cce5b6fe11fe8c69b08140d645c604fef59e42a..d9877c4bedca550478507f268f43e137e4454c24:/widgets/temp.lua?ds=sidebyside diff --git a/widgets/temp.lua b/widgets/temp.lua index 9c82b8b..e769b25 100644 --- a/widgets/temp.lua +++ b/widgets/temp.lua @@ -26,7 +26,6 @@ local function worker(args) function update() local f = io.open(tempfile) - local coretemp_now if f then coretemp_now = tonumber(f:read("*all")) / 1000 f:close() @@ -40,7 +39,7 @@ local function worker(args) newtimer("coretemp", timeout, update) - return temp.widget + return setmetatable(temp, { __index = temp.widget }) end return setmetatable(temp, { __call = function(_, ...) return worker(...) end })