Per-website touchbar with Chrome?

I'd like to have the default Chrome touchbar most of the time but for a few sites I'd rather have the FN keys. Is it possible to toggle between them based on the current active Chrome tab?

1 Like

Probably you'd need BTT + some kind of Chrome extension so you could know what tab is currently open

Jup you can use conditional activation groups and the "Window Name" condition. The active tab title is always the window title.

In many cases that's enough to recognize a website, sometimes it's necessary to install a chrome extension that sets the window title to the URL of the active tab.

2 Likes

Sorry to reopen this thread, but I'm wondering whether there's a more elegant solution than renaming chrome tabs, say, using a BTT customVariable to parse the URL in the active chrome window? Trying to figure out how to disable BTT when google spreadsheets are in focus.

There are many ways, but you always need some Chrome extension. IMHO the easiest is to use something like https://chrome.google.com/webstore/detail/url-in-title/ignpacbgnbnkaiooknalneoeladjnfgb?hl=de and then create a conditional activation group that looks for the url.

Usually you won't notice any change because the websites original title is already long enough to fill the tab - but BTT can read the URL that is appended to the title.

Cool, thanks. I see there's a black/white list for that Chrome extension, so I don't have to change window names for all domains. That'll work.

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.

1 Like