[core] Collapse modules by using middle mouse

When pressing the middle mouse button (and it's not assigned to any
other functionality), the module (i.e. all widgets of that module) will
disappear and be replaced with the module's icon (or prefix, as
fallback) and an ellipsis.

fixes #264
This commit is contained in:
Tobias Witek 2018-05-30 10:42:31 +02:00
parent 455707c583
commit 290f95d6b4
4 changed files with 41 additions and 5 deletions

View file

@ -102,10 +102,12 @@ class I3BarOutput(object):
padding = self._theme.padding(widget)
prefix = self._theme.prefix(widget, padding)
suffix = self._theme.suffix(widget, padding)
if prefix:
full_text = u"{}{}".format(prefix, full_text)
if suffix:
full_text = u"{}{}".format(full_text, suffix)
separator = self._theme.separator(widget)
if separator:
self._widgets.append({