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

View file

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