2012/1/24 Tomás Solar Castro <[email protected]>:
> El 24/01/12 15:13, Robert David escribió:
>
> local function update()
>   local d = awful.util.pread("acpi -t")
>   local temp = { }
>   for t in d:gmatch("Thermal %d+: %w+, (%d+.?%d*) degrees") do
>      table.insert(temp, t)
>   end
>
I think whatever is getting grabbed in `temp` is not convertible by tonumber.

You could either use some 'print(temp)' statements inside obvious to
see what its doing, or take that bit out of obvious and run it through
lua by itself.

For the latter, i think you need only to substitute lua's native popen
for awful's:

local temp = { }
local d = io.popen("acpi -t")
for t in d:gmatch("Thermal %d+: %w+, (%d+.?%d*) degrees") do
      table.insert(temp, t)
      print('got t=', t)
end

zero testing on that btw..

-- 
perry

--
To unsubscribe, send mail to [email protected].

Reply via email to