Skip to content
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

Handle URL protocols #118

Closed
10 tasks done
jaimergp opened this issue Feb 22, 2023 · 0 comments
Closed
10 tasks done

Handle URL protocols #118

jaimergp opened this issue Feb 22, 2023 · 0 comments
Labels
locked [bot] locked due to inactivity type::feature request for a new feature or capability type::poc indicates some proof of concept or MVP work

Comments

@jaimergp
Copy link
Contributor

jaimergp commented Feb 22, 2023

Checklist

  • I added a descriptive title
  • I searched open requests and couldn't find a duplicate

What is the idea?

Associate a given URL/URI protocol with an application via its shortcut. This is different in each platform:

Notes for macOS

The URL is not passed via argv. Instead an event is emitted, containing the URL. In macOS, we have a C launcher because macOS expects a single identifiable binary inside the .app directory. This cannot be a shell script, because those are executed with a shell outside the app. The C launcher forks and spawns the command (whose main executable should be symlinked inside the app too). This way, macOS ties everything nicely, including the event loop, plus keyboard shortcut menus and more. Without it, the app does launch but it's not as well integrated in the system. Check this thread for more info.

We would need to teach the C launcher to listen to those events, but the Apple APIs are mostly available in Swift and Objective C, so we need to create something. After some research we have found some resources:

@aganders3 has been experimenting with other setups too so we might need change how all this works. More info in #117.

Why is this needed?

Applications often need to be associated with file types and URL protocols to handle special links being clicked on a website (e.g. app store stuff, authentication workflows...).

What should happen?

The associated app should launch with the URL being passed through standard means.

Additional Context

Note, this only covers launching an app with a given URL. If you want an open app to recognize URLs or files being passed, you might need a running service that dispatches to a listener or something, and this is not in the scope of menuinst. We might probably create a general solution for that though? Or maybe something exists.

@jaimergp jaimergp added type::feature request for a new feature or capability type::poc indicates some proof of concept or MVP work labels Feb 22, 2023
@github-project-automation github-project-automation bot moved this to 🏁 Done in 🧭 Planning Jun 29, 2023
@github-actions github-actions bot added the locked [bot] locked due to inactivity label Jun 29, 2024
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked [bot] locked due to inactivity type::feature request for a new feature or capability type::poc indicates some proof of concept or MVP work
Projects
Archived in project
Development

No branches or pull requests

1 participant