Skip to content

Instantly share code, notes, and snippets.

@pauldambra
Last active July 8, 2024 10:16
Show Gist options
  • Save pauldambra/427dea547102be341fb88a292dfbc73e to your computer and use it in GitHub Desktop.
Save pauldambra/427dea547102be341fb88a292dfbc73e to your computer and use it in GitHub Desktop.
finicky config
// Save as ~/.finicky.js
// get profile names using `jq '.profile.info_cache | map_values(.name)' < ~/Library/Application\ Support/Google/Chrome/Local\ State`
const personal = {
name: "Google Chrome",
profile: "Profile 1",
};
const work = {
name: "Google Chrome",
profile: "Default",
};
module.exports = {
defaultBrowser: personal,
handlers: [
{
match: finicky.matchHostnames(["github.com"]),
browser: work
},
{
match: ["meet.google.com/*"],
browser: work
},
{
match: finicky.matchHostnames(["stackoverflow.com", "twitter.com", "instagram.com", "reddit.com"]),
browser: personal
},
{
// Open any link clicked in Slack in Work Chrome Profile
match: ({ opener }) => {
if (opener.bundleId === "com.tinyspeck.slackmacgap") {
if (finicky.getKeys().shift) {
return false
}
return true
}
if (finicky.getKeys().shift) {
return true
}
return false
},
browser: work
},
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment