From e84a6090f3660a7c46ce3b5f1a80f7090e2d6bf1 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Sat, 1 Jan 2022 14:23:30 -0600 Subject: [PATCH] window_title: Use empty_title if title is None (#799) Co-authored-by: tjg1 <1909894+tjg1@users.noreply.github.com> --- i3pystatus/window_title.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/i3pystatus/window_title.py b/i3pystatus/window_title.py index 9460132..4446822 100644 --- a/i3pystatus/window_title.py +++ b/i3pystatus/window_title.py @@ -64,6 +64,8 @@ class WindowTitle(Module): else: title = w.name class_name = w.window_class + if title is None: + title = self.empty_title if len(title) > self.max_width: title = title[:self.max_width - 1] + "…" return self.format.format(title=title, class_name=class_name)