Last active
July 8, 2024 10:16
-
-
Save pauldambra/427dea547102be341fb88a292dfbc73e to your computer and use it in GitHub Desktop.
finicky config
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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