badmonster 1 day ago

Would you consider adding support for domain-specific overrides (e.g., open *.notion.site links with Chrome but other URLs with Safari) in future versions?

2
beaugunderson 1 day ago

I use Hammerspoon for this and it's super configurable via Lua--open some URLs with Chrome profile 1, some with profile 2, some in incognito, open normal Spotify links with the Spotify app, normal Zoom links with Zoom (skip opening a tab that then opens the zoom:// link), etc.

For Google Drive links I open a picker that lets me choose from two chrome profiles and incognito.

037 1 day ago

Would you mind sharing some tips on how to set that up? A code snippet or a link to the relevant docs would be super helpful.

beaugunderson 1 day ago

Certainly, the bulk of the functionality is provided by URLDispatcher:

https://www.hammerspoon.org/Spoons/URLDispatcher.html

Here's a cleaned up version of my config... I also mapped global cmd-shift-1/2/i to focus my profile and incognito windows (and create a window if none already existed):

https://gist.github.com/beaugunderson/d1ca2218b9b272f3ac3573...

037 1 day ago

Thanks a lot — that’s way more than I expected!

badmonster 1 day ago

cool

philocalyst 1 day ago

Thank you for the question! I didn’t even think of this use case. I’ll setup regex (and wildcards) but not scripting.

Check back in a week!

philocalyst 1 day ago

Walking this back, the API only allows setting this up for app bundles, which adds another layer of complexity I'm not down for. I want it to be a CLI tool, it doesn't need a helper or any other layers.

As a kind of apology, I made a drop-in hammerspoon config that should accomplish exactly what you wanted: https://gist.github.com/philocalyst/ad9f6d7cc08a9cdefa795e1b...

And if you've never used it before: https://www.hammerspoon.org/go/