Skip to content

Commit

Permalink
Ignore empty color strings to prevent xsession errors (#864)
Browse files Browse the repository at this point in the history
Fixes #863
  • Loading branch information
terminalmage authored and tyjak committed Aug 15, 2024
1 parent e7daa7d commit db55e27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions i3pystatus/core/modules.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ def inject(self, json):
if "name" not in self.output:
self.output["name"] = self.__name__
self.output["instance"] = str(id(self))
if (self.output.get("color", "") or "").lower() == "#ffffff":
del self.output["color"]
if (self.output.get("color", "") or "").lower() in ("", "#ffffff"):
self.output.pop("color", None)
if self.hints:
for key, val in self.hints.items():
if key not in self.output:
Expand Down

0 comments on commit db55e27

Please sign in to comment.