Merge branch 'master' of http://git.sysphere.org/vicious into HEAD

Conflicts:
	widgets/bat.lua
	widgets/thermal.lua
This commit is contained in:
J. Thalheim 2011-11-20 02:19:16 +01:00
commit e77576ac69
2 changed files with 2 additions and 1 deletions

View File

@ -73,6 +73,7 @@ local function worker(format, warg)
else else
return {state, percent, time} return {state, percent, time}
end end
-- Calculate time (but work around broken BAT/ACPI implementations)
local hoursleft = math.min(math.floor(timeleft), 0) local hoursleft = math.min(math.floor(timeleft), 0)
local minutesleft = math.min(math.floor((timeleft - hoursleft) * 60 ), 0) local minutesleft = math.min(math.floor((timeleft - hoursleft) * 60 ), 0)
time = string.format("%02d:%02d", hoursleft, minutesleft) time = string.format("%02d:%02d", hoursleft, minutesleft)

View File

@ -30,7 +30,7 @@ local function worker(format, warg)
-- Get temperature from thermal zone -- Get temperature from thermal zone
local thermal = helpers.pathtotable(zone[warg[2]][1] .. warg[1]) 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 data then
if zone[warg[2]].div then if zone[warg[2]].div then
return {data / zone[warg[2]].div} return {data / zone[warg[2]].div}