From fd96fc6d2e160183dec0bd9c9b04bff24edff9fc Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Thu, 30 May 2024 00:28:05 -0500 Subject: [PATCH] Ignore empty color strings to prevent xsession errors (#864) Fixes #863 --- i3pystatus/core/modules.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i3pystatus/core/modules.py b/i3pystatus/core/modules.py index 7368fc4..ba1e6c3 100644 --- a/i3pystatus/core/modules.py +++ b/i3pystatus/core/modules.py @@ -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: