How I manage my Safari Profiles

One of my main complaints about Safari is that you cannot easily switch to an existing profile window. That is, you can create new Safari windows with a specific profile with a shortcut or with the UI selector, but you can only switch to another profile if the current safari Window has not tabs.

I’ll explain the best solution I’ve found here.

The first solution is a nifty helper tool called ProfileLauncher (one time payment, $5):

As can be seen, the app recognizes all of possible Safari profiles through a smart accessibility hack and gives you shortcuts or even app urls to switch to those windows. You can even add these profiles to the menubar. Easy!

But sadly it doesn’t offer good keyboard shortcut support and also you cannot select which of the profiles are shown in the menu (you can see I have quite a few for personal and work stuff)

In ProfileLauncher the shortcuts to open specific Safari profile windows can be turned into mini-apps that perform the action, which you can potentially add to your launcher of choice, or even keep them in the Dock.

Now please enter Folder Peek by the profilic Sindre (free).

What I did was simply create a specific folder where I put there the mini-launchers created by Profile Launcher but only those that are my most used ones. And then it’s simply a matter of creating a menu with Folder Peek, assigning it to a hotkey and I’m golden, I now hit OPT-A and bam! instant profile switching in Safari.

As an added trick, I renamed the profile mini launcher apps so that they are numbered, so Folder Peek allows me to select the right option with a number.

Edit to add: why do I have that many Safari Profiles? The answer is being a consultant that has to work with a bunch of different Teams tenants associated with the same work email address so I need to have strict cookie isolation in the different Microsoft domains otherwise Teams ends up misbehaving. Also, each Safari profile can keep its own Bookmarks bar, which is very useful and quick to manage relevant reference bookmarks.

3 Likes

This recent post on MacStories offers a different approach:

I use BTT so I read that article, but I was under the impression that in that automation they were basically assigning shortcuts to the Safari “New Window with Profile”, it’s not exactly that they switch to an existing Safari window with the profile you want, is it?

it’s not exactly that they switch to an existing Safari window with the profile you want, is it?

I think you got that right (and I got it wrong when reading that article previously).

I have used Keyboard Maestro in the past to switch between profiles when I was still using a Mac at work, but I can’t remember how I exactly did this (without a tool like ProfileLauncher).

(Should have that action in a Git archive on GitHub though)

Yes, this KM macro achieves the same behavior, it can create new windows with a profile or switch to existing ones. I see it is using automation to parse the Safari > Window menu which is the approach I initially took with Better Touch Tool: to search for the name of the profile in the Window menu.

But I believe this may fail if the Safari window with the profile you want to switch to is displaying a Tab Group (surprise!!!) in that case, the Window menu entry will have the name of the group, not the name of the Profile so the regex match will fail, I think.

I think Apple has fallen short in the implementation of Groups and Profiles, it seems to only be half-baked. The inconsistency of UI, the lack of keyboard shortcuts, and even the absence of AppleScript support…