[modules/progress] improved autohide functionality
Simplify the previous autohide functionality by adding a flag that lets a module (e.g. progress) indicate that the current state should be "revealed" (not auto-hidden). This vastly simplifies the implementation. see #835
This commit is contained in:
parent
5ad211f862
commit
26e4bdd7eb
2 changed files with 2 additions and 2 deletions
|
@ -229,7 +229,7 @@ class i3(object):
|
|||
for widget in module.widgets():
|
||||
if widget.module and self.__config.autohide(widget.module.name):
|
||||
if not any(
|
||||
state in widget.state() for state in ["warning", "critical"]
|
||||
state in widget.state() for state in ["warning", "critical", "no-autohide"]
|
||||
):
|
||||
continue
|
||||
if module.hidden():
|
||||
|
|
|
@ -101,7 +101,7 @@ class Module(core.module.Module):
|
|||
|
||||
def state(self, widget):
|
||||
if self.__active:
|
||||
return "copying"
|
||||
return ["copying", "no-autohide"]
|
||||
return "pending"
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue