From 9d8c1f910ef89cad9e1ec10f8e4268044aa68ba5 Mon Sep 17 00:00:00 2001 From: me Date: Fri, 31 Jan 2020 11:37:42 +0200 Subject: [PATCH] when there's nothing to return, do it ASAP --- bumblebee/output.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bumblebee/output.py b/bumblebee/output.py index 06b123b..925fd0b 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -354,15 +354,17 @@ class WidgetDrawer(object): list[1] - JSON text for the widget """ - separator = self._theme.separator(widget) - self.add_separator(widget, separator) - - full_text = widget.full_text() if widget.get_module() and widget.get_module().hidden(): return [] if widget.get_module() and widget.get_module().name in self._config.autohide(): if not any(state in widget.state() for state in ["warning", "critical"]): return [] + + separator = self._theme.separator(widget) + self.add_separator(widget, separator) + + full_text = widget.full_text() + padding = self._theme.padding(widget) prefix = self._theme.prefix(widget, padding)