You already know like https:? That’s a URL Scheme. You’re in all probability accustomed to the idea, because of others that come up in front-end growth, like mailto:. You may really make your personal, which is fairly cool. There are loads of them.
I discover that customized URL schemes come up probably the most with apps which can be each internet apps and native apps. For instance, two that I take advantage of practically every single day: Notion and Figma. I love that the issues I work on in these apps have URLs. URLs for all the pieces! 🎉
And but. After I seize the URL to a Notion web page, which I do repeatedly to share with co-workers, I get a URL like…
That’s positive, and works to open that Notion web page within the browser. However I want Notion-the-native-app. It’s Electron, so it’s nonetheless an online app I suppose, however I don’t use it from my internet browser, I take advantage of it from the applying Notion.app on my literal machine.
Geoff shared with me an article the opposite day that paperwork how straightforward it’s to make an utility’s browser URL open up within the native app as a substitute:
Happily, Notion’s dev crew thought of that, and constructed the notion:// hyperlink protocol. In the event you substitute the https:// portion of any Notion web page hyperlink with notion://, your hyperlink will routinely open inside the native app as a substitute of an online browser.
That’s nice that the native scheme is actually the identical as the net scheme, apart from the identify. Thomas goes tremendous deep on this with strategies to change the content material of clipboard to exchange Notion hyperlinks with the customized scheme.
I simply wished to notice a technique I feel works properly for me. The trick isn’t to change the hyperlinks themselves, however to react to hyperlinks that you realize are Notion hyperlinks by redirecting them to open in Notion.app.
The trick, on Macs, is Picky:
I want to arrange Picky such that it by no means asks me what browser to make use of, it simply does it based mostly on guidelines. So below the settings, I’ve a bunch of apps arrange:
For Notion, I look ahead to hyperlinks to Notion, and have it open up Notion… that’s it!
The opposite apps mainly do the very same factor. Works nice.
One caveat although! As soon as in a blue moon, I’ve to come back in right here and flip sure purposes off. For instance, a password reset stream would possibly ship me to slack.com or one thing, for a sure web page as a part of the stream that’s solely accessible via the net. If Picky is doing its factor, it tries to pressure that web page to open in Slack.app, which it gained’t, and you’ll kinda get trapped. So, I’ve to come back in right here and flip it off briefly.