From f07485ac814ae2f0897608d054e0aea460563b21 Mon Sep 17 00:00:00 2001 From: enkore Date: Wed, 30 Jul 2014 19:42:56 +0200 Subject: [PATCH] Possible fix for #89 --- i3pystatus/battery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/battery.py b/i3pystatus/battery.py index fd964f9..59c58cf 100644 --- a/i3pystatus/battery.py +++ b/i3pystatus/battery.py @@ -49,7 +49,7 @@ class Battery: return self._percentage("_DESIGN" if design else "") * 100 def status(self): - if self.consumption() > 0.1: + if self.consumption() > 0.1 and self.percentage() < 99.9: return "Discharging" if self.battery_info["STATUS"] == "Discharging" else "Charging" else: return "Full"