[core/output] fix logic error when using "autohide"

- when state is critical or warning -> *show* the module
- when state is mayhide -> *hide* the module

see #835
This commit is contained in:
tobi-wan-kenobi 2021-11-05 19:11:45 +01:00
parent cbd989309d
commit 74ecbb6ca8

View file

@ -229,9 +229,11 @@ class i3(object):
for widget in module.widgets(): for widget in module.widgets():
if widget.module and self.__config.autohide(widget.module.name): if widget.module and self.__config.autohide(widget.module.name):
if not any( if not any(
state in widget.state() for state in ["warning", "critical", "mayhide"] state in widget.state() for state in ["warning", "critical"]
): ):
continue continue
if "mayhide" in widget.state():
continue
if module.hidden(): if module.hidden():
continue continue
if widget.hidden: if widget.hidden: