This won't work since the steam://open/minigameslist does not match cut -f4- -d" " | grep '^Steam$'

This could be replaced to:

 wmctrl -l | tr -s " " | grep 'N/A'