How to change touchbar triggers within an app

Sorry if this has been asked before.

I use BTT for my touchbar and love it. I'm trying to see if there is a way to change the touchbar when something in the app changes.

For example, I have the touchbar set for Android Studio with custom triggers. One of the buttons I have on the touchbar opens up the Git dialog within Android Studio. I am wondering if, when this dialog opens, I can now change the touchbar to reflect the options in this dialog?

You could maybe attach an additional action and add the "Open Touch Bar Group With Name" action. Then create a separate group that contains the triggers for that dialog. However you'd need to close it manually afterwards.

Maybe it could also work with conditional activation groups matching the window title, but I'm not sure about that.