diff --git a/py3status/modules/conky.py b/py3status/modules/conky.py index e810656da2..803b4b2b60 100644 --- a/py3status/modules/conky.py +++ b/py3status/modules/conky.py @@ -369,15 +369,16 @@ def post_config_hook(self): tmp = f"conky.config = {config}\nconky.text = [[{text}]]" # write tmp output to '/tmp/py3status-conky_*', make a command - self.tmpfile = NamedTemporaryFile(prefix="py3status_conky-", suffix=".conf", delete=False) + self.tmpfile = NamedTemporaryFile(prefix="py3status_conky-", suffix=".conf", delete_on_close=False) self.tmpfile.write(str.encode(tmp)) self.tmpfile.close() self.conky_command = f"conky -c {self.tmpfile.name}".split() # skip invalid conky errors - self.invalid_conky_errors = [ + self.ignored_conky_outputs = [ "conky: invalid setting of type 'table'", "conky: FOUND:", + "x11 session running", ] # thread @@ -399,7 +400,7 @@ def _start_loop(self): while True: line = self.process.stdout.readline().decode() if self.process.poll() is not None or "conky:" in line: - if any(x in line for x in self.invalid_conky_errors): + if any(x in line for x in self.ignored_conky_outputs): continue raise Exception(line) if self.line != line: