Contents

Documentation

Hat Trick is your default browser. When you click a link in another app, Hat Trick asks which Safari or Chrome profile opens it, and it suggests a profile. This page explains how to set it up and how the suggestions work. The questions on the home page have more answers.

Set up Hat Trick

Hat Trick needs macOS 14 or later, and Safari 17 or later or Google Chrome. Open the download, and move Hat Trick to the Applications folder. Then open it. Hat Trick is a menu bar app, so its hat is in the menu bar, and it is in the Dock only while its welcome window or its Settings window is open.

  1. Accessibility: Hat Trick opens with a welcome window that explains this access. Click Continue, click Open System Settings in the message from macOS, and turn on Hat Trick. You can also allow Hat Trick in System Settings ▸ Privacy & Security ▸ Accessibility. Hat Trick needs this access to read the title of the window that a link comes from, which can name an account. Safari also needs it: Hat Trick reads the names of your profiles from Safari’s File menu, and it chooses File ▸ New ‹Profile› Window.
  2. Default browser: choose Settings… ▸ Make Default in the menu bar menu. You can also choose Hat Trick in System Settings ▸ Desktop & Dock ▸ Default web browser.
  3. Control of Safari: the first time that you open a link in Safari, macOS asks if Hat Trick can control Safari. Click Allow.

Turn on Launch at login in Settings, so that the prompt shows at once. Otherwise, macOS starts Hat Trick when you click a link.

The trial and the licence

Hat Trick has every feature for 30 days from its first launch on each Mac, without a licence. After that, it continues to work. Until you enter a licence, the prompt shows a reminder, and you can choose a profile after 5 seconds. A link with an “always” rule opens without the prompt, as before.

To buy a licence, choose Buy Hat Trick… in the menu bar menu, or go to Pricing. A licence is for one person, on all of their own Macs.

To enter your key, choose Enter Licence… in the menu bar menu. Settings ▸ Licence opens. Paste the key from the email of your purchase.

Choose the browsers and the profiles

Settings ▸ Profiles has a switch for each browser, and a checkbox for each of its profiles. Only Safari is on at first, so turn on Chrome there if you use it. The prompt lists the ticked profiles of each browser that is on. Hat Trick ticks each new profile. macOS can protect Chrome’s profiles from other apps. Then Settings shows an Allow Access button under Chrome. Click it, and then click Allow in the window that shows Chrome’s folder. macOS keeps this permission.

When more than one browser is on, each row of the prompt shows the icon of its browser. When two profiles of a browser have the same name, each row also shows the account of its profile.

After you rename or add a Safari profile, choose Refresh Profiles in the menu bar menu. Hat Trick also reads the profiles again each time that a link comes in while Safari is open.

Use the prompt

Key Action
1–9 Open the link in that profile
↩ Open the link in the highlighted profile
↑ ↓ Move the highlight
N Turn “Open in a new window” on or off
A Turn “Always open this site without asking” on or off
L Turn “Always open ‹profile› links from ‹app› without asking” on or off
⌥ with a number, a click or ↩ Change the new-window setting for this link only
⌘C Copy the link
esc Cancel

The link opens in a new tab of the newest window of the profile, or in a new window when the profile has none. For Safari, Hat Trick uses only a window of the profile on your current Space, so that the link does not open out of view on another Space. When you force a new window with N or ⌥, the highlighted row shows New window.

The prompt closes when you click another window, as Spotlight does.

Suggestions

The highlighted profile is the suggestion. Hat Trick takes the first profile that it finds in this list:

  1. Your “always” rule for the site, and then your “always” rule for the app and the profile name in its window title.
  2. A profile name in the title of the window that the link came from. See Window titles.
  3. The profile that you chose last time for the site, for example mail.google.com.
  4. The profile that you chose last time for the domain, for example google.com or stuff.co.nz.
  5. The profile that you chose last time for the app that the link came from, for example Slack.
  6. The profile that you used last.

Window titles

Many apps put the account or the workspace in the title of the window. Slack shows general (Channel) - Work - Slack, and Mimestream shows Inbox: Primary – Work. When the title has the name of exactly one of your profiles as a whole word, Hat Trick suggests that profile.

  • Capitals and accents do not matter.
  • The name must be a whole word or words. The profile “Fernbird” matches Inbox – sam@fernbird.co, but not Fernbirds Fan Club.
  • When the title has two names and one contains the other, such as “Lume” and “Lume Staging”, the longer name wins.
  • This works for any app, and you do not set anything up.

So give each profile the name of its mail account or its Slack workspace, or rename an account to match its profile.

To see the title that Hat Trick read, hover over the app icon in the prompt.

To open the links from an app without the prompt, see Always open the links from an app in a profile.

Always open a site in a profile

Turn on Always open this site without asking in the prompt, or press A, before you choose a profile. After that, the links to that site open in that profile without the prompt.

To get the prompt for such a link once, hold ⌥ while you click the link.

When the title of the window that a link came from has the name of a profile, the prompt also offers Always open ‹profile› links from ‹app› without asking. Turn it on, or press L, before you choose that profile. After that, a link from that app opens in that profile without the prompt while the window title of the app has the name of the profile. A link from a window with the name of another profile, or without a profile name, shows the prompt.

The rule is only for the profile in the title. So the option is dim while another profile is highlighted, and Hat Trick does not add the rule when you choose another profile.

An app can have a rule for each profile, for example for each Slack workspace. When a site also has an “always” rule, the rule of the site comes first.

Use this rule for an app that shows the account or the workspace in each window title. In a mail app, the window title can be the subject of a message, and a subject can have the name of a profile by chance.

To get the prompt for such a link once, hold ⌥ while you click the link.

Undo a choice

For 20 seconds after a link opens, the menu bar menu has Choose Again for ‹site›…, which shows the prompt for that link again. When an “always” rule opened the link, the menu also has Forget Rule: ‹site› → ‹profile› or Forget Rule: ‹profile› Links from ‹app›, and Choose Again forgets that rule too.

Settings ▸ Rules lists the “always” rules for sites and for apps. You can change the profile of a site’s rule, and you can forget each rule. Forget All Remembered Choices forgets the profiles that you chose last for each site, domain and app, which Hat Trick uses for the suggestions. The rules stay.

Chrome lists its profiles in a settings file. Hat Trick reads the names from that file, so Chrome does not need to be open. When macOS protects the file, Hat Trick needs your permission one time, from Allow Access in Settings ▸ Profiles. To open a link, Hat Trick starts Chrome with the profile and the link. When Chrome is open already, Chrome opens the link in its window of that profile.

Safari does not let other apps choose a profile. So Hat Trick finds the window of a profile from its title, because Safari starts each window title with the name of the profile. It uses the front window of the profile on the current Space. When the profile has no window there, Hat Trick opens a new window, also when the profile has a window on another Space or a minimized window. To open a new window of a profile, Hat Trick chooses File ▸ New ‹Profile› Window.

Limits

  • When a Safari window shows a Tab Group, its title can start with the name of the Tab Group, not the profile. Then Hat Trick does not find that window, and it opens a new window for the profile.
  • Chrome chooses the window of the profile itself, so it can open the link in a window on another Space.
  • The links that you click in Safari or in Chrome stay in that browser. Only the links from other apps go to Hat Trick.
  • Keep only one copy of Hat Trick on your Mac. macOS can send a link to any copy of the default browser.