How to Disable All Other Touchbar Buttons?

Hi,
I have a conditional group that is only activated when customVariable = "1" (set via applescript). What I would like to accomplish is: when this group is enabled (i.e. customVariable = "1"), Touchbar will not show any other buttons.

Is there an easy way to do that?

Thanks!