Skip to content

Allow firefox profiles? #466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Allow firefox profiles? #466

wants to merge 1 commit into from

Conversation

fa7ad
Copy link

@fa7ad fa7ad commented Jul 14, 2025

Hi, sorry about the unprompted PR feel free to close/reject but a little context:

I mostly use Finicky to open URLs on a specific Firefox profile based on the opener app's name. Even though v3 didn't officially support Firefox (iirc), I got it working with args as a workaround:

V3 Config:
// Use https://finicky-kickstart.now.sh to generate basic configuration
// Learn more about configuration options: https://github.com/johnste/finicky/wiki/Configuration
module.exports = {
  defaultBrowser: ({ urlString }) => ({
    name: "Firefox Developer Edition",
    args: ["-P", "00-Work", `${urlString}`],
  }),
  handlers: [
    {
      match: ({ opener }) => /telegram|spark|spotify/i.test(opener.name),
      browser: ({ urlString }) => ({
        name: "Firefox Developer Edition",
        args: ["-P", "90-Personal", `${urlString}`],
      }),
    },
  ],
};

This broke completely in V4 and I hit probably the same issue as #431, #460 made it less broken but I was still missing the --new/-n flag on open, so it would just switch to the correct window with this config:

V4 Config (not working)
import type {
  BrowserSpecification,
  FinickyConfig,
} from "/Applications/Finicky.app/Contents/Resources/finicky.d.ts";

const workFirefox: BrowserSpecification = url => ({
  name: "Firefox Developer Edition",
  args: ['-P="90-Personal"', url.toString()]
});

const nonWorkFirefox: BrowserSpecification = url => ({
  name: "Firefox Developer Edition",
  args: ['-P="90-Personal"', url.toString()]
});

const config = {
  defaultBrowser: workFirefox,
  handlers: [
    {
      match: (_, { opener }) =>
        /telegram|spark|spotify/i.test(opener?.name ?? ""),
      browser: nonWorkFirefox,
    },
  ],
} satisfies FinickyConfig;

export default config;

So I decided to look into the code a little bit, and ended up making this change. I got the following config to work now, correctly opening the right profile and I no longer have to use the args workaround at all.

V4 Config (working)
import type {
  BrowserSpecification,
  FinickyConfig,
} from "/Applications/Finicky.app/Contents/Resources/finicky.d.ts";

const workFirefox: BrowserSpecification = {
  name: "Firefox Developer Edition",
  profile: "00-Work",
};

const nonWorkFirefox: BrowserSpecification = {
  ...workFirefox,
  profile: "90-Personal",
};

const config = {
  defaultBrowser: workFirefox,
  handlers: [
    {
      match: (_, { opener }) =>
        /telegram|spark|spotify/i.test(opener?.name ?? ""),
      browser: nonWorkFirefox,
    },
  ],
} satisfies FinickyConfig;

export default config;

I don't know if there are some side-effects to doing this, unless this breaks something I don't really see a reason why firefox profiles shouldn't be allowed the same way Chrome/ium profiles are. (I guess this closes #90).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support for Firefox profiles
1 participant