Merge pull request #89 from yvesh/dontdrawwidgetwhenempty

[Output] Only draw widget when full text is not empty
This commit is contained in:
tobi-wan-kenobi 2017-05-27 11:27:04 +02:00 committed by GitHub
commit 8fba2f1809

View file

@ -93,6 +93,9 @@ class I3BarOutput(object):
def draw(self, widget, module=None, engine=None):
"""Draw a single widget"""
full_text = widget.full_text()
"""Don't draw it when we only have an empty text"""
if full_text == "":
return
padding = self._theme.padding(widget)
prefix = self._theme.prefix(widget, padding)
suffix = self._theme.suffix(widget, padding)