Ignore empty color strings to prevent xsession errors (#864)

Fixes #863
This commit is contained in:
Erik Johnson 2024-05-30 00:28:05 -05:00 committed by GitHub
parent 28ed5c1c30
commit fd96fc6d2e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -87,8 +87,8 @@ class Module(SettingsBase):
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: