Merge branch 'master' of http://git.sysphere.org/vicious into HEAD
Conflicts: widgets/bat.lua widgets/thermal.lua
This commit is contained in:
commit
e77576ac69
|
@ -73,6 +73,7 @@ local function worker(format, warg)
|
|||
else
|
||||
return {state, percent, time}
|
||||
end
|
||||
-- Calculate time (but work around broken BAT/ACPI implementations)
|
||||
local hoursleft = math.min(math.floor(timeleft), 0)
|
||||
local minutesleft = math.min(math.floor((timeleft - hoursleft) * 60 ), 0)
|
||||
time = string.format("%02d:%02d", hoursleft, minutesleft)
|
||||
|
|
|
@ -30,7 +30,7 @@ local function worker(format, warg)
|
|||
-- Get temperature from thermal zone
|
||||
local thermal = helpers.pathtotable(zone[warg[2]][1] .. warg[1])
|
||||
|
||||
data = thermal[zone[warg[2]].file]
|
||||
local data = thermal[zone[warg[2]].file]
|
||||
if data then
|
||||
if zone[warg[2]].div then
|
||||
return {data / zone[warg[2]].div}
|
||||
|
|
Loading…
Reference in New Issue