When I click on links from Slack or Outlook on MacOS they open in seemingly random browser windows/profiles. This is annoying.
Open links in a particular Google Chrome profile window based on the source application or URL. Be less annoyed.
- In Chrome, visit
chrome://versionand find the desired profile name. Mine wasDefault. Copy that profile's directory name, likeProfile 2orDefault, not the profile's vanity name you see when you click on your profile icon in the browser. - Install Finicky:
brew install finicky. After install it should be running and you should see the icon in the upper toolbar. - From the Finicky Toolbar Item, click
> Config > Create New(or edit~/.finicky.js/~/.finicky.ts).
Recommended for newer installations.
Create or edit ~/.finicky.ts:
import type { FinickyConfig } from "/Applications/Finicky.app/Contents/Resources/finicky.d.ts";
/**
* Finicky Configuration
* Version: 4.0
*/
export default {
defaultBrowser: "Google Chrome",
options: {
hideIcon: false,
checkForUpdates: true,
},
handlers: [
{
// Open specific domains in a work profile
match: ({ url }: any) => url.host.includes("example-work-domain"),
browser: {
name: "Google Chrome",
profile: "Profile 2", // Your work profile directory name
},
},
{
// Open links from specific apps in a personal profile
match: ({ opener }: any) =>
["Slack", "Microsoft Outlook"].includes(opener?.name ?? ""),
browser: {
name: "Google Chrome",
profile: "Default", // Your personal profile directory name
},
},
{
// Ensure Slack deep links open in the Slack app
match: ({ url }: any) => url.protocol === "slack:",
browser: "/Applications/Slack.app",
},
],
} satisfies FinickyConfig;Version 3 (JavaScript) Legacy configuration.
Create or edit ~/.finicky.js:
module.exports = {
defaultBrowser: "Google Chrome",
options: {
hideIcon: false,
checkForUpdate: true,
},
handlers: [
{
match: ({ opener }) =>
["Slack", "Microsoft Outlook"].includes(opener.name),
browser: {
name: "Google Chrome",
profile: "Default",
},
},
{
match: ({ url }) => url.protocol === "slack",
browser: "/Applications/Slack.app",
},
],
};Reload Finicky from the toolbar: > Config > Reload. Done. Enjoy.
Worked like a charm! This is such a lifesaver. Thanks for posting this.