From 333a1f9907b28769c132011220361673d1903a97 Mon Sep 17 00:00:00 2001 From: me Date: Fri, 31 Jan 2020 11:53:25 +0200 Subject: [PATCH] only query config for markup value once --- bumblebee/output.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bumblebee/output.py b/bumblebee/output.py index 73654bf..021fcc0 100644 --- a/bumblebee/output.py +++ b/bumblebee/output.py @@ -370,7 +370,9 @@ class WidgetDrawer(object): self._prefix = self._theme.prefix(widget, padding) self._suffix = self._theme.suffix(widget, padding) - if self._config.markup() == "pango": + markup = "none" if not self._config else self._config.markup() + + if markup == "pango": # add prefix/suffix colors fg = self._theme.prefix_fg(widget) bg = self._theme.prefix_bg(widget) @@ -392,8 +394,6 @@ class WidgetDrawer(object): if width: full_text = full_text.ljust(len(width) + len(self._prefix) + len(self._suffix)) - markup = "none" if not self._config else self._config.markup() - if markup == "pango": full_text = full_text.replace("&", "&")