jopemachine / alfred-chrome-workflow

Chromium based browser workflow for Alfred 4
https://www.npmjs.com/package/alfred-chrome-workflow
MIT License
39 stars 3 forks source link

Feature Request: Put more hardcoded configurations into `alfy.config` #4

Closed chengjianhua closed 3 years ago

chengjianhua commented 3 years ago

Chromium kernel browsers can reuse the powerful abilities of this workflow.

But right now, the browser name is hardcoded, e.g. https://github.com/jopemachine/alfred-chrome-workflow/blob/39e29905a099ffeeece0794cdebc0d24f0f6a0ef/src/utils.js#L86

/Users/${userName}/Library/Application Support/Google/Chrome could be /Users/${userName}/Library/Application Support/Microsoft Edge.

So, cloud you read browser from the alfred variables? alfy support this by process.env.XXX, it's very handy~

🙏 Appreciate your great works!

jopemachine commented 3 years ago

Thanks for suggesting this :)

I've added browser to conf.json for supporting other chrome kernel-based browsers in 0.2.6

If you have any problems or other feedback, I would appreciate it if you could let me know :)

chengjianhua commented 3 years ago

@jopemachine My other suggestion is replacing conf.json with alfy.config. conf.json is published within npm package: https://github.com/jopemachine/alfred-chrome-workflow/blob/master/package.json#L59

After users upgraded to the alfred-chrome-workflow of the newest version, the local rewired conf.json would be reset to the public version, so it'll overwrite the user's customized configuration.

alfy.config can solve this by putting the user's customized configuration in ~/Library/Application Support/Alfred/Workflow Data/alfred-chrome-workflow. So the configuration is fully local, it's safe to persis user-customized configuration after upgrades.

jopemachine commented 3 years ago

@jopemachine My other suggestion is replacing conf.json with alfy.config. conf.json is published within npm package: https://github.com/jopemachine/alfred-chrome-workflow/blob/master/package.json#L59

After users upgraded to the alfred-chrome-workflow of the newest version, the local rewired conf.json would be reset to the public version, so it'll overwrite the user's customized configuration.

alfy.config can solve this by putting the user's customized configuration in ~/Library/Application Support/Alfred/Workflow Data/alfred-chrome-workflow. So the configuration is fully local, it's safe to persis user-customized configuration after upgrades.

Ok, I will handle this.

It is definitely inconvenient to keep updating the config file.

(I should have considered the users' position more..)

Thank you for raising and explaining this issue again :)

jopemachine commented 3 years ago

Resolved in version 0.2.7

Thanks for your contribution!