Skip to content

Commit

Permalink
bat: fix broken battery remaining time (was always N/A)
Browse files Browse the repository at this point in the history
Bug was introduced in commit dc556e5 and the new discharging
symbol.

Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
  • Loading branch information
lydericl authored and anrxc committed Dec 27, 2013
1 parent bfbc1bd commit 6e16a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion widgets/bat.lua
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ local function worker(format, warg)
if rate ~= nil and rate ~= 0 then
if state == "+" then
timeleft = (tonumber(capacity) - tonumber(remaining)) / tonumber(rate)
elseif state == "-" then
elseif state == "" then
timeleft = tonumber(remaining) / tonumber(rate)
else
return {state, percent, time, wear}
Expand Down

0 comments on commit 6e16a41

Please sign in to comment.