Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 18 additions & 24 deletions home/.finicky.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,25 @@ const chromeApps = {
calendar: 'kjbdgfilnfhdoflbpgamdcdgpehopbep',
};

// Trims startup work in the throwaway "-n" forwarding process Chrome spawns
// per profile-routed open; see .claude/rules/finicky.md.
const fastLaunchArgs = ['--no-first-run', '--no-default-browser-check'];

// Finicky drops the positional URL once `args` is set, so append it explicitly or Chrome opens blank.
const inProfile = (profile: string) => (url: URL) => ({
name: 'Google Chrome',
profile,
args: [...fastLaunchArgs, url.href],
});

// Open a URL in an installed Chrome PWA, as the app (its own dock icon and
// cmd-tab entry) rather than as a Chrome window. See the "Chrome PWAs" section
// of .claude/rules/finicky.md for why this specific pair of switches.
const inChromeApp = (appId: string) => (url: URL) => ({
name: 'Google Chrome',
profile: workChromeProfile,
args: [
...fastLaunchArgs,
`--app-id=${appId}`,
`--app-launch-url-for-shortcuts-menu-item=${url.href}`,
],
Expand Down Expand Up @@ -182,37 +194,25 @@ const config: FinickyConfig = {
'slides.google.com/*',
'drive.google.com/*',
],
browser: {
name: 'Google Chrome',
profile: workChromeProfile,
},
browser: inProfile(workChromeProfile),
},

// Datadog - open in Chrome
{
match: ['*.datadoghq.com/*', 'datadoghq.com/*'],
browser: {
name: 'Google Chrome',
profile: workChromeProfile,
},
browser: inProfile(workChromeProfile),
},

// AWS - open in Chrome work profile
{
match: ['*.awsapps.com/*', 'awsapps.com/*'],
browser: {
name: 'Google Chrome',
profile: workChromeProfile,
},
browser: inProfile(workChromeProfile),
},

// YouTube - open in Chrome
{
match: ['youtube.com/*', '*.youtube.com/*', 'youtu.be/*'],
browser: {
name: 'Google Chrome',
profile: personalChromeProfile,
},
browser: inProfile(personalChromeProfile),
},

// Sites that commonly have Chrome-specific optimizations
Expand All @@ -226,10 +226,7 @@ const config: FinickyConfig = {
match: (url: URL) =>
url.host.toLowerCase() === 'github.com' &&
/^\/(gusto|rubyatscale)\b/i.test(url.pathname),
browser: {
name: 'Google Chrome',
profile: workChromeProfile,
},
browser: inProfile(workChromeProfile),
},

// Development/localhost - might want these in Chrome for DevTools
Expand All @@ -242,10 +239,7 @@ const config: FinickyConfig = {
'*.test*',
'*.dev*',
],
browser: {
name: 'Google Chrome',
profile: workChromeProfile,
},
browser: inProfile(workChromeProfile),
},
],

Expand Down
Loading