mirror of https://github.com/lcpz/lain.git
simple fix to #20
This commit is contained in:
parent
cbb144a79e
commit
3a387e9f49
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue