From c5c0fc40b60c1dbe955821ed8bf645adb1df58a8 Mon Sep 17 00:00:00 2001 From: Stepan Kurennykh Date: Mon, 20 May 2019 21:33:19 +0300 Subject: [PATCH] convert title.max parameter to int --- bumblebee/modules/title.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/bumblebee/modules/title.py b/bumblebee/modules/title.py index efa529f..97e7255 100644 --- a/bumblebee/modules/title.py +++ b/bumblebee/modules/title.py @@ -47,10 +47,11 @@ class Module(bumblebee.engine.Module): return self.focused_title(widget) def focused_title(self, widget): - title = self._full_title[0:self.parameter("max", 64)] + max = int(self.parameter("max", 64)) + title = self._full_title[0:max] placeholder = self.parameter("placeholder", "...") if title != self._full_title: - title = self._full_title[0:self.parameter("max", 64) - len(placeholder)] + title = self._full_title[0:max - len(placeholder)] title = "{}{}".format(title, placeholder) return title