will-stone / browserosaurus

🩖 The browser prompter for macOS
https://browserosaurus.com
GNU General Public License v3.0
1.69k stars 160 forks source link

feat: add option to exit after launch #690

Closed benjamingwynn closed 3 months ago

benjamingwynn commented 3 months ago

Using this option fixes #595 by proxy of spawning a new instance on the current desktop.

I imagine cleaning up Browserosaurus can also help conserve memory usage on those systems with little of it, at the cost of startup time.

Keep in mind if this option is set during development, Browserosaurus will exit and you'll have to restart it on the command line to use it as the default HTTP handler; but in production this would seamlessly spin up the app when the user clicks a link.

This returns a promise from openApp which could perhaps be used for more extensive error handling in the future.

will-stone commented 3 months ago

Thanks for being enthusiastic about this but this must be incredibly slow, no? B is an Electron app, there’s no way people would put with this feature, surely.

will-stone commented 3 months ago

Again, thanks for being passionate enough about the project to go digging in the source, but I won’t be merging this feature. Next time I would ask you wait for a reply before spending time on this. But on the bright side, you now have a fork that behaves how you’d like it to â˜ș If you’re able to solve the original problem with the fullscreen app, then I’d be happy to look at that.

benjamingwynn commented 3 months ago

Hey @will-stone ! Thanks for getting back to me so quickly - no problem that you don't want this upstream

Next time I would ask you wait for a reply before spending time on this.

No worries on that front! I was looking to build my own experience with redux and macos electron apps

But on the bright side, you now have a fork that behaves how you’d like it to

Indeed, if I could get it built 😛

Sorry for the obvious question, but when I was trying to package the application into a .app to test I was getting an obscure signing error - do I need to get my own Apple developer keys or something to get this working? I'm assuming you either keep these or have these in a CI/CD pipeline for official B builds

If you’re able to solve the original problem with the fullscreen app, then I’d be happy to look at that

I'd be willing to look at this but it's probably beyond my ability, and as far as I know this hasn't gotten an upstream bug report in Electron yet.

Interestingly, vscode's code CLI wrapper doesn't seem to have this problem when spawning a new vscode instance, so perhaps the solution for B would be a similar wrapper program? (Just thinking aloud at this point)

will-stone commented 3 months ago

To distribute you’ll need to pay for an Apple Developer account.

You can run the package command to get a .app for your Mac’s architecture though and that should work.