From 6e16a412efc190e450b14dd5f53261e33ec99379 Mon Sep 17 00:00:00 2001 From: Lyderic Lefever Date: Wed, 25 Dec 2013 12:31:43 +0100 Subject: [PATCH] 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) --- widgets/bat.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/widgets/bat.lua b/widgets/bat.lua index 454e43f..1f491d9 100644 --- a/widgets/bat.lua +++ b/widgets/bat.lua @@ -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}