From 703c9646d8b654ff5c40f89c54267a78b484dfb7 Mon Sep 17 00:00:00 2001 From: knotteye Date: Sat, 6 Nov 2021 22:52:48 -0500 Subject: [PATCH] sway moved the class properties to the window_properties subfield, updated to handle this --- src/swayfocus.cr | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/swayfocus.cr b/src/swayfocus.cr index 35a19c7..ddb6733 100644 --- a/src/swayfocus.cr +++ b/src/swayfocus.cr @@ -22,7 +22,7 @@ class Window property app_id : String = "" - @[JSON::Field(key: "class")] + @[JSON::Field(key: "window_properties", root: "class")] property wclass : String = "" property marks : Array(String) = [] of String @@ -90,7 +90,10 @@ OptionParser.parse do |parser| end parser.on "-t WTYPE", "--type=WTYPE", "Match against window type (app_id for wayland, class for xwayland)" do |wtype| - window_list.select! {|w| w.app_id.includes?(wtype) || w.wclass.includes?(wtype)} + window_list.select! {|w| puts w.name + puts w.app_id + puts w.wclass + w.app_id.includes?(wtype) || w.wclass.includes?(wtype)} end parser.invalid_option do |flag|