hello, it is possible to open automatically a Touch Bar group when an url on safari is open ?
You have to
- Create a conditional activation group (CAG) with the desired app and as window name contains the domain
- Create a trigger that opens the group once the CAG activated
- Create the group.
@Caliguvara
Can you kindly elaborate on which trigger I need to create?
All of them creates a button that I have to press in order to open the touch bar group.
I need touch bar group in order to hide other elements for this specific application.
Thanks,
but doesn't that still just create a button that you have to press in order to show the touch bar group?
OP original question was to show touch group without creating a button like that?
The trigger "if CAG activated → open group XY" opens the group right ahead. Check out my preset where you find some examples. But you are right, inside my group I have a button to close the group - and if this happens, I see my global actions AND the button to open the group again.
Thank you so much for your kind reply. It made sense.
Have a nice day!
Glad I could help
If you need to be more specific for the CAG, don't hesitate to add you Browser as as second bullet "Application…is…"
This is very helpful. However, I have created a CAG trigger for an app. The trigger works as I have put in a HUD confirmation while testing. But the group of actions I want to load flashes onto the TouchBar briefly but then is not visible. What am I likely to have done wrong?
Oh duh! I was thinking I needed to create another group with all my actions in, but the CAG is the group that gets opened.
Right. Or just create an empty CAG XY for the sites or whatever, then create a normal group ZA with your actions, and then a trigger "if CAG XY is activated → action: open TouchBar group ZA"
This should work too
That's what I was trying to do at first, but it didn't work for me. I'll try again.
I would like to bump this. As this can be tricked; if you do a google search for say youtube or are looking at the wikipedia page for youtube, the CAG would open for these irrelevant sites. some websites also don't have a consistent window name, so they're hard to target.
Does anyone know how to get URLs to work directly with CAGs?
Any follow up on this?
I ended up using Andreas' suggestion of using a Chrome extension to add the tab's URL to the window title.
I found a solution. I worked with ChatGPT to create a script that loops and updates the variable.
You can run this Terminal Command:
osascript -e 'repeat; tell application "Google Chrome"; set windowCount to count windows; if windowCount is greater than 0 then; set chromeWindow to window 1; set tabURL to URL of active tab of chromeWindow; tell application "BetterTouchTool"; set_string_variable "customVariable1" to tabURL; end tell; else; display alert "No Chrome windows found."; end if; end tell; delay 1; end repeat'
I also made a BTT action to run this terminal command to make it easier.