sway moved the class properties to the window_properties subfield, updated to handle this

master
knotteye 3 years ago
parent 9b5b9b9562
commit 703c9646d8
  1. 7
      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|

Loading…
Cancel
Save