skyjake / lagrange

A Beautiful Gemini Client
https://gmi.skyjake.fi/lagrange/
BSD 2-Clause "Simplified" License
1.19k stars 62 forks source link

External protocol handlers #213

Open t-900-a opened 3 years ago

t-900-a commented 3 years ago

Would be implemented similar to mozilla firefox how you can be asked which application to open the uri with. http://kb.mozillazine.org/Register_protocol

skyjake commented 3 years ago

Noting that this is separate from #135 in that one is choosing applications based on URI scheme and not the media type.

runvnc commented 3 years ago

Hello, I have made kind of a hacky patch for something like this using xdg-open. I am guessing you will want to do it in a more sophisticated/robust way. But it seems to work on my Ubuntu computer.

gemini://biomimetic.me/lagrange.gmi

skyjake commented 3 years ago

I am guessing you will want to do it in a more sophisticated/robust way.

Yeah, the solution here should be cross-platform or at a minimum #ifdef'd with iPlatform* defines. Thanks anyway!

runvnc commented 3 years ago

My intention, which I felt was fairly clear, was to provide a simple patch that other users could build off of if they so desired and it happened to suit their needs (such as working on their platform), as a temporary option while waiting for your solution. I would have made a PR if I had been asking you to accept something.

MCMic commented 3 years ago

Please do not repeat mozilla mistake of having its own type/software association in Firefox. My OS knows what software should be used to open a file and lagrange should trust it.

tedwardd commented 1 year ago

Please do not repeat mozilla mistake of having its own type/software association in Firefox. My OS knows what software should be used to open a file and lagrange should trust it.

But it should be something that can be overridden. My use case for this is that I have a browser profile for work and another for personal. I want URLs opened through gemini to open in a specific profile that is not my default.