diff --git a/core/config.py b/core/config.py index c90aad8..4d6c1a3 100644 --- a/core/config.py +++ b/core/config.py @@ -39,4 +39,7 @@ class Config(util.store.Store): def iconset(self): return self._args.iconset + def autohide(self, name): + return name in self._args.autohide + # vim: tabstop=8 expandtab shiftwidth=4 softtabstop=4 diff --git a/core/output.py b/core/output.py index a8358fc..874ce9c 100644 --- a/core/output.py +++ b/core/output.py @@ -93,6 +93,9 @@ class i3(object): def widgets(self, module): widgets = [] for widget in module.widgets(): + if self._config.autohide(widget.module().name()): + if not any(state in widget.state() for state in [ 'warning', 'critical']): + continue widgets += self.__separator(module, widget) widgets += self.__main(module, widget, self._status[widget]) core.event.trigger('next-widget')