I think it will use something like this below, but I don’t know how/where to fit it into the above script:
"manipulators": [
{
"conditions": [
{
"bundle_identifiers": [
"^org.gnu.Emacs",
"^com.apple.Teamviewer”
],
"type": "frontmost_application_if"
}