From 12a9aeebb9066a9b8a714b87badc8042f24136fe Mon Sep 17 00:00:00 2001 From: gutodisse1 Date: Thu, 10 Sep 2015 23:18:11 -0300 Subject: [PATCH] Update cpu_usage.py Add color option on cpu_usage.py --- i3pystatus/cpu_usage.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/i3pystatus/cpu_usage.py b/i3pystatus/cpu_usage.py index 5df3dc7..ad1ff2f 100644 --- a/i3pystatus/cpu_usage.py +++ b/i3pystatus/cpu_usage.py @@ -28,12 +28,14 @@ class CpuUsage(IntervalModule): format_all = "{core}:{usage:02}%" exclude_average = False interval = 1 + color = None settings = ( ("format", "format string."), ("format_all", ("format string used for {usage_all} per core. " "Available formaters are {core} and {usage}. ")), ("exclude_average", ("If True usage average of all cores will " - "not be in format_all.")) + "not be in format_all.")), + ("color", "HTML color code #RRGGBB") ) def init(self): @@ -117,5 +119,6 @@ class CpuUsage(IntervalModule): usage['usage'] = usage['usage_cpu'] self.output = { - "full_text": self.format.format_map(usage) + "full_text": self.format.format_map(usage), + "color": self.color }