Is there any way to open a specific Safari profile?

Ideally, I would also like to open a tab group within the profile. I don't see anything that looks helpful in the scripting dictionary. Please tell me there is a way...

How do you do it manually?

And how about open a new window with a specific Profile active. Keyboard shortcuts are available
CleanShot 2023-10-03 at 15.25.47@2x

And then the same of course for closing. Maybe close a window that starts with a certain string? Or activate the window that starts with a certain string and the close the active window.

That would be a great addition.

Using profiles a bit more I realised my statement above is not correct if you are using tab groups. Then the name of the tab group is the first part of the Window name.

So, it could still be useful if you choose the names of your tab groups wisely.

Turns out that Apple made Safari Profiles so smart they are difficult to use programmatically.
First, you can't currently change the 'default' profile. I have several Macs and the one I use for work, I would love to be able to open Safari and have it default to the Work profile.

Second, once you have a Window open for a Profile, the CMD-N hotkey opens additional Windows under that profile. To open a Window for a different Profile, you have to mouse through menus or you have to use ALT-SHIFT-CMD-. Your first Profile (the default) is always "0", the second "1", and so on. But these hotkey/shortcuts only work if the target Profile is not the active Window.


Meaning, for example, my Personal profile is the first (and default) and is "0" and my Work profile is "1". If I have a Window open for my Personal Profile, I can only CMD-N to open an additional Window for that Profile, I can't ALT-SHIFT-CMD-0 as well. But, since the active Window is in my Personal Profile, I can ALT-SHIFT-CMD-1 to open an additional Window in my Work Profile, which, upon becoming active, means I can't use ALT-SHIFT-CMD-1, I can only use CMD-N to open more windows in the now active Work Profile.

It would be great if it wasn't so 'smart' and you could use CMD-N for the active Window/Profile and also use ALT-SHIFT-CMD- at any time so that ALT-SHIFT-CMD-0 and ALT-SHIFT-CMD-1 could always be used. But it doesn't work that way now.

1 Like

I got swamped at work shortly after posting this and I am only now getting back to it. I think something might have changed since @ChicagoJoe answered because I find that I can be in my default Personal Profile window and still do ALT-SHIFT-CMD-0 to open another Personal Profile window, so the profile part seems workable now.
But what about the tab groups? I think @wilkoVanA might have been saying a way but I am not understanding.

apple is in the process of hitting a homerun ... hope they create an easier way to switch thru profiles. I primarly use a MacBook so i dont have a numpad to switch thru profiles with the current commands