X-Git-Url: https://git.madduck.net/etc/awesome.git/blobdiff_plain/0b80b45bc9bca17f08e8055d364bac17f96129bd..f849e631d64e7445ca8abde847191976447f0f93:/widgets/temp.lua diff --git a/widgets/temp.lua b/widgets/temp.lua index 67c9456..a4ada52 100644 --- a/widgets/temp.lua +++ b/widgets/temp.lua @@ -29,8 +29,7 @@ local function worker(args) function update() local f = io.open(tempfile) - if f ~= nil - then + if f then coretemp_now = tonumber(f:read("*all")) / 1000 f:close() else @@ -42,6 +41,7 @@ local function worker(args) end newtimer("coretemp", timeout, update) + return temp.widget end