From db55e275d0917e163a54c055e48f40236e75c60d 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 7368fc4b..ba1e6c3b 100644 --- a/i3pystatus/core/modules.py +++ b/i3pystatus/core/modules.py @@ -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: