From 87725f783a909863ca58e94a5b969009584a65c9 Mon Sep 17 00:00:00 2001 From: me Date: Fri, 28 Feb 2020 17:30:52 +0200 Subject: [PATCH] [modules/cpu2] align cpu load This fixes a rough edge in cpu2 module where variable size of total cpu load value string was making the whole bar slide during updates. CPU load is right-alligned now and takes 3 chars in the widget, so load can go up to 100 and still fit. --- bumblebee/modules/cpu2.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bumblebee/modules/cpu2.py b/bumblebee/modules/cpu2.py index 1e78a2d..250ec4d 100644 --- a/bumblebee/modules/cpu2.py +++ b/bumblebee/modules/cpu2.py @@ -89,7 +89,7 @@ class Module(bumblebee.engine.Module): return "{:.2f}GHz".format(self._maxfreq) def cpuload(self, _): - return "{}%".format(self._cpuload) + return "{:>3}%".format(self._cpuload) def add_color(self, bar): """add color as pango markup to a bar"""