simple fix to #20

This commit is contained in:
luke bonham 2014-01-21 16:01:28 +01:00 committed by copycat-killer
parent a33a8afae0
commit a2d553c9b6
1 changed files with 2 additions and 1 deletions

View File

@ -22,12 +22,13 @@ local temp = {}
local function worker(args)
local args = args or {}
local timeout = args.timeout or 5
local tempfile = args.tempfile or "/sys/class/thermal/thermal_zone0/temp"
local settings = args.settings or function() end
temp.widget = wibox.widget.textbox('')
function update()
local f = io.open("/sys/class/thermal/thermal_zone0/temp")
local f = io.open(tempfile)
if f ~= nil
then
coretemp_now = tonumber(f:read("*all")) / 1000