From 7d55bdce6cbe74e138da1563b6ccba1df78af8b4 Mon Sep 17 00:00:00 2001 From: Tobias Witek Date: Sun, 25 Nov 2018 17:50:05 +0100 Subject: [PATCH] [engine/output] Use (experimental) custom widget padding When padding a widget, instead of using the "min_width" field of the i3bar protocol, which seems to "swallow" click events, perform a custom padding by simply extending the right-hand side with spaces. fixes #334 --- bumblebee/output.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/bumblebee/output.py b/bumblebee/output.py index a8a25d4..f299f3e 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -125,13 +125,18 @@ class I3BarOutput(object): "separator_block_width": self._theme.separator_block_width(widget), }) width = self._theme.minwidth(widget) + + if width: + full_text = full_text.ljust(len(width) + len(prefix) + len(suffix)) + self._widgets.append({ u"full_text": full_text, "color": self._theme.fg(widget), "background": self._theme.bg(widget), "separator_block_width": self._theme.separator_block_width(widget), "separator": True if separator is None else False, - "min_width": width + "A"*(len(prefix) + len(suffix)) if width else None, + "min_width": None, +# "min_width": width + "A"*(len(prefix) + len(suffix)) if width else None, "align": self._theme.align(widget), "instance": widget.id, "name": module.id,