diff options
author | Matt Singleton <matt@xcolour.net> | 2024-05-31 14:11:52 -0500 |
---|---|---|
committer | Matt Singleton <matt@xcolour.net> | 2024-05-31 14:11:52 -0500 |
commit | c2818ee9acd9e4cdf0ce3d9c081169ce8f84fe50 (patch) | |
tree | 9984b0fc16fc3d7928d55127957e46147302cec1 /sway-de/xdg-names | |
parent | 7f7b1fabb448dc7cb1ed008f916bd336567de7cf (diff) |
assign icons based on window class for xwayland windows
Diffstat (limited to 'sway-de/xdg-names')
-rw-r--r-- | sway-de/xdg-names/.config/xdg-names.ini | 1 | ||||
-rwxr-xr-x | sway-de/xdg-names/.local/bin/xdg-names.py | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/sway-de/xdg-names/.config/xdg-names.ini b/sway-de/xdg-names/.config/xdg-names.ini index 529df80..3a08dd8 100644 --- a/sway-de/xdg-names/.config/xdg-names.ini +++ b/sway-de/xdg-names/.config/xdg-names.ini @@ -7,6 +7,7 @@ icon=_ xwayland=X foot= shotwell= +Signal= [xdg_main] Audio= Video= 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: |