From 99cc3a2582af6f3844663972fe0303265d31b737 Mon Sep 17 00:00:00 2001 From: Vincent Bernat Date: Sat, 24 Jul 2021 20:36:15 +0200 Subject: [PATCH] i3-companion: fix workspace icon when no match --- bin/i3-companion | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bin/i3-companion b/bin/i3-companion index 8512c9c..52cb799 100755 --- a/bin/i3-companion +++ b/bin/i3-companion @@ -311,14 +311,8 @@ async def workspace_rename(i3, event): if window.sticky: continue cls = (window.window_class or "").lower() - icon = application_icons.get( - cls, - application_icons.get( - cls.split("-")[0], application_icons.get(application_icons_nomatch) - ), - ) - if icon is not None: - icons.add(icon) + icon = application_icons.get(cls, application_icons.get(cls.split("-")[0])) + icons.add(icon or application_icons_nomatch) if any([i not in application_icons_alone for i in icons]): icons -= application_icons_alone new_name = f"{workspace.num}:{'|'.join(icons)}".rstrip(":")