window_title: Use empty_title if title is None (#799)

Co-authored-by: tjg1 <1909894+tjg1@users.noreply.github.com>
This commit is contained in:
Erik Johnson 2022-01-01 14:23:30 -06:00 committed by GitHub
parent 211ece568c
commit e84a6090f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)