bat: fix broken battery remaining time (was always N/A)
Bug was introduced in commit dc556e5415
and the new discharging
symbol.
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
This commit is contained in:
parent
bfbc1bdd51
commit
6e16a412ef
|
@ -74,7 +74,7 @@ local function worker(format, warg)
|
||||||
if rate ~= nil and rate ~= 0 then
|
if rate ~= nil and rate ~= 0 then
|
||||||
if state == "+" then
|
if state == "+" then
|
||||||
timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate)
|
timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate)
|
||||||
elseif state == "-" then
|
elseif state == "−" then
|
||||||
timeleft = tonumber(remaining) / tonumber(rate)
|
timeleft = tonumber(remaining) / tonumber(rate)
|
||||||
else
|
else
|
||||||
return {state, percent, time, wear}
|
return {state, percent, time, wear}
|
||||||
|
|
Loading…
Reference in New Issue