diff --git a/bumblebee/modules/cpu2.py b/bumblebee/modules/cpu2.py index d7e83b5..1e78a2d 100644 --- a/bumblebee/modules/cpu2.py +++ b/bumblebee/modules/cpu2.py @@ -91,17 +91,16 @@ class Module(bumblebee.engine.Module): def cpuload(self, _): return "{}%".format(self._cpuload) - @staticmethod - def add_color(bar): + def add_color(self, bar): """add color as pango markup to a bar""" if bar in ["▁", "▂"]: - color = "green" + color = self.theme().color("green", "green") elif bar in ["▃", "▄"]: - color = "yellow" + color = self.theme().color("yellow", "yellow") elif bar in ["▅", "▆"]: - color = "orange" + color = self.theme().color("orange", "orange") elif bar in ["▇", "█"]: - color = "red" + color = self.theme().color("red", "red") colored_bar = "{}".format(color, bar) return colored_bar