diff --git a/i3pystatus/amdgpu.py b/i3pystatus/amdgpu.py index 14f2fdc..674cd59 100644 --- a/i3pystatus/amdgpu.py +++ b/i3pystatus/amdgpu.py @@ -18,10 +18,12 @@ class Amdgpu(IntervalModule): settings = ( 'format', + 'color', ('card', '[1, 2, ...] card to read (options are in /sys/class/drm/)') ) card = 0 + color = None format = '{temp} {mclk} {sclk}' def init(self): @@ -56,6 +58,8 @@ class Amdgpu(IntervalModule): self.output = { 'full_text': self.format.format(**self.data) } + if self.color: + self.output['color'] = self.color @staticmethod def parse_clk_reading(reading): diff --git a/i3pystatus/calendar/__init__.py b/i3pystatus/calendar/__init__.py index 6fceb6b..cb56b61 100644 --- a/i3pystatus/calendar/__init__.py +++ b/i3pystatus/calendar/__init__.py @@ -142,6 +142,7 @@ class Calendar(IntervalModule, ColorRangeModule): ('urgent_seconds', "When within this many seconds of the event, set the urgent flag"), ('urgent_blink', 'Whether or not to blink when within urgent_seconds of the event'), ('dynamic_color', 'Whether or not to change color as the event approaches'), + 'color' ) required = ('backend',) @@ -155,6 +156,7 @@ class Calendar(IntervalModule, ColorRangeModule): dynamic_color = True urgent_seconds = 300 urgent_blink = False + color = None current_event = None urgent_acknowledged = False @@ -204,9 +206,14 @@ class Calendar(IntervalModule, ColorRangeModule): def run(self): if self.current_event and self.current_event.time_remaining > timedelta(seconds=0): + color = None + if self.color is not None: + color = self.color + elif self.dynamic_color: + color = self.get_color() self.output = { "full_text": formatp(self.format, **self.current_event.formatters()), - "color": self.get_color() if self.dynamic_color else None, + "color": color, "urgent": self.is_urgent() } else: diff --git a/i3pystatus/deluge.py b/i3pystatus/deluge.py index 4a40460..d9cb7b4 100644 --- a/i3pystatus/deluge.py +++ b/i3pystatus/deluge.py @@ -25,6 +25,7 @@ class Deluge(IntervalModule): settings = ( 'format', + 'color', ('rounding', 'number of decimal places to round numbers too'), ('host', 'address of deluge server (default: 127.0.0.1)'), ('port', 'port of deluge server (default: 58846)'), @@ -38,6 +39,7 @@ class Deluge(IntervalModule): host = '127.0.0.1' port = 58846 path = None + color = None libtorrent_stats = False rounding = 2 offline_string = 'offline' @@ -79,6 +81,8 @@ class Deluge(IntervalModule): self.output = { 'full_text': self.format.format(**self.data) } + if self.color: + self.output['color'] = self.color def parse_values(self, values): for k, v in values.items(): diff --git a/i3pystatus/net_speed.py b/i3pystatus/net_speed.py index 22357ca..013fe9e 100644 --- a/i3pystatus/net_speed.py +++ b/i3pystatus/net_speed.py @@ -19,7 +19,8 @@ class NetSpeed(IntervalModule): settings = ( ("units", "Valid values are B, b, bytes, or bits"), - "format" + "format", + 'color' ) color = "#FFFFFF" interval = 300 diff --git a/i3pystatus/plexstatus.py b/i3pystatus/plexstatus.py index c419139..c643b6d 100644 --- a/i3pystatus/plexstatus.py +++ b/i3pystatus/plexstatus.py @@ -21,6 +21,7 @@ class Plexstatus(IntervalModule): settings = ( "format", + "color", ("apikey", "Your Plex API authentication key"), ("address", "Hostname or IP address of the Plex Media Server"), ("port", "Port which Plex Media Server is running on"),