Quantcast
Channel: Active questions tagged jq - Stack Overflow
Viewing all articles
Browse latest Browse all 665

Subscribing to a Window event with Sway

$
0
0

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. :)


Viewing all articles
Browse latest Browse all 665

Latest Images

Trending Articles



Latest Images