I'm using sway and would like to perform some action in bash, when a certain window is created. Right now this is what I have:
swaymsg -mt subscribe '["window"]' | jq 'select(.change == "new") | select(.container.window_properties.class == "frontend")' |while read -r _; do echo WORKS done So far, if I remove the while loop, I get the text I expect printed out to the terminal so I think my jq filter works. But I'm stumped why "WORKS" doesn't get printed. I assume I'm doing something silly that I didn't realize. Any help is appreciated. :)