Skip to content

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).

@johnste
Copy link
Owner

johnste commented Nov 17, 2025

Very nice! I'll check this out now

@johnste
Copy link
Owner

johnste commented Nov 17, 2025

I'm learning now that there are two different versions of Firefox profiles. This approach seems to work ok for legacy profiles. There doesn't seem to be an approach that works for newer profiles.

However, I'm not opposed to merging this more or less as is. Hopefully it will prove useful for more people.

If you would resolve the conflicts we can move ahead with this. Thanks!

@fa7ad
Copy link
Author

fa7ad commented Nov 19, 2025

Thanks for taking a look, I've updated the PR resolving the conflicts now 😊

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

2 participants