From c2818ee9acd9e4cdf0ce3d9c081169ce8f84fe50 Mon Sep 17 00:00:00 2001 From: Matt Singleton Date: Fri, 31 May 2024 14:11:52 -0500 Subject: assign icons based on window class for xwayland windows --- sway-de/xdg-names/.local/bin/xdg-names.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'sway-de/xdg-names/.local/bin') diff --git a/sway-de/xdg-names/.local/bin/xdg-names.py b/sway-de/xdg-names/.local/bin/xdg-names.py index fb4767a..b5c3e42 100755 --- a/sway-de/xdg-names/.local/bin/xdg-names.py +++ b/sway-de/xdg-names/.local/bin/xdg-names.py @@ -113,7 +113,10 @@ def assign_generic_name(i3, e): else: old_name = con.workspace().name # assume windows without an app_id are xwayland - app_id = "xwayland" if con.app_id is None else con.app_id + if con.app_id is None: + app_id = con.window_class or "xwayland" + else: + app_id = con.app_id name = get_ws_name(con.workspace().num, app_id) i3.command(f'rename workspace "{old_name}" to "{name}"') except Exception as e: -- cgit v1.2.3