Possible to have a Touch Bar Button that shows up when a specific app is open -- and not only when that app is front-most?

Hi all,

Is it possible to make a Touch Bar Button that shows up if a specific app is open -- and not only when that app is front-most?

For example, when I launch a particular application, a new button appears and remains in the Touch Bar even if I switch to another app? And if quit the app that opened it, that's when the Button closes from the Touch Bar?

Certainly possible with some applescript.

The following idea might work depending on how your app starts/stop.
The idea would be to trigger an applescript when your app start to setup one of the custom BTT variable and then use the conditional activation group related to that variable in order to control if you display that (set) of button.

In top of triggering an applescript when the application start, you have to trigger another script when the application closes to reset the variable to a value that does not display the activation group.

This means that you need to know all the method that you use to start/stop that application in order to know how to design such script in a correct way (in most of the cases BTT has a solution to trigger such applescript.
For example if that app pass to the foreground when it starts/stop then you can use the trigger "conditional activation group activated/desactivated" to trigger the applescript.

Cheers,

Olivier

Either this, or an Apple Script widget would do the job :man_shrugging:t4: