From 1defe9612ccbd0dcff1253cd783fe5f070febdbf Mon Sep 17 00:00:00 2001 From: Sean Estabrooks Date: Wed, 8 Jun 2022 17:35:28 -0400 Subject: [PATCH] application-mapper: gracefully handle Sway edge case Sometimes in Sway, when an application goes from fullscreen to windowed mode, there is neither a "app_id" or "window_properties" attribute. Avoid throwing an exception for this case. --- scripts/keyd-application-mapper | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/scripts/keyd-application-mapper b/scripts/keyd-application-mapper index 3310728..9dd2a04 100755 --- a/scripts/keyd-application-mapper +++ b/scripts/keyd-application-mapper @@ -112,8 +112,11 @@ class SwayMonitor(): cls = props['class'] title = props['title'] except: - title = '' - cls = data['container']['app_id'] + try: + title = '' + cls = data['container']['app_id'] + except: + pass if title == '' and cls == '': continue