From c91c792a7dc2107412e8843a1d1fbe8660859f5b Mon Sep 17 00:00:00 2001 From: Argish42 Date: Thu, 28 Aug 2014 00:28:23 +0200 Subject: [PATCH 1/3] battery full --- i3pystatus/battery.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/i3pystatus/battery.py b/i3pystatus/battery.py index 3a15f0b..e1d857d 100644 --- a/i3pystatus/battery.py +++ b/i3pystatus/battery.py @@ -171,6 +171,12 @@ class BatteryChecker(IntervalModule): } return + if battery.percentage() > 99.9: + self.output = { + "full_text": "" + } + return + fdict = { "battery_ident": self.battery_ident, "percentage": battery.percentage(), From de4bc9e70f2e76e978555d85bcbb831ce9517836 Mon Sep 17 00:00:00 2001 From: Argish42 Date: Thu, 28 Aug 2014 00:43:46 +0200 Subject: [PATCH 2/3] battery-full --- i3pystatus/battery.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/i3pystatus/battery.py b/i3pystatus/battery.py index e1d857d..88d4645 100644 --- a/i3pystatus/battery.py +++ b/i3pystatus/battery.py @@ -131,6 +131,7 @@ class BatteryChecker(IntervalModule): ("charging_color", "The charging color"), ("critical_color", "The critical color"), ("not_present_color", "The not present color."), + ("no_text_full","Don't display text when battery is full - 100%"), ) battery_ident = "BAT0" format = "{status} {remaining}" @@ -150,6 +151,7 @@ class BatteryChecker(IntervalModule): charging_color = "#00ff00" critical_color = "#ff0000" not_present_color = "#ffffff" + no_text_full = False path = None @@ -170,12 +172,12 @@ class BatteryChecker(IntervalModule): "color": self.not_present_color, } return - - if battery.percentage() > 99.9: - self.output = { - "full_text": "" - } - return + if self.no_text_full: + if battery.percentage() > 99.9: + self.output = { + "full_text": "" + } + return fdict = { "battery_ident": self.battery_ident, From 15b9484e98fe730926bf15b057682fe049a1c4dd Mon Sep 17 00:00:00 2001 From: Argish42 Date: Thu, 28 Aug 2014 13:16:31 +0200 Subject: [PATCH 3/3] def-status --- i3pystatus/battery.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/i3pystatus/battery.py b/i3pystatus/battery.py index 88d4645..b4c7962 100644 --- a/i3pystatus/battery.py +++ b/i3pystatus/battery.py @@ -173,7 +173,7 @@ class BatteryChecker(IntervalModule): } return if self.no_text_full: - if battery.percentage() > 99.9: + if battery.status() == 'Full': self.output = { "full_text": "" }