Open lunaneff opened 2 years ago
Yes but it should be submitted for review as a freedesktop standard.
I don't have time to work on this ATM but I'm happy to build the implementation in Junction if anyone is willing to put work into a specification that https://www.freedesktop.org can get behind.
For inspiration
Desktop Interfaces should probably be used for such feature.
There is an example for Terminal Intent https://gitlab.freedesktop.org/xdg/xdg-specs/-/merge_requests/46
Incorporating Fincky like functionality in Junction could be quite an effort, but it lays out a well thought out and implemented design.
Coming from the Mac, I adore the way https://github.com/johnste/finicky#example-configuration solves this problem with a Javascript configuration file that can specify RegExp patterns on URIs and more. However, the best of both worlds is when Finicky becomes the default web browser or handler of HTTP MIME types and then it evaluates how to handle the URI. For no Finicky matches, it passes control to it's default browser, which could be a browser picker like Junction. So, the pattern of invocation of HTTP MIME type would need to change to Fincky or it's equivalent first, and it would need to be configured to pick Junction.
Could there be a manner to shell out to a command which could do URI filtering/rewriting and exit with a matching browser handler identified or error on no-match which would allow the current Junction experience? There's a little bit of an chicken and egg problem here based on MIME type defaults.
@mlavi this is out of scope for this issue which is about apps, not users.
Please file a separate issue. I made something similar but closed it due to lack of interest, perhaps an issue would give the idea more visibility https://github.com/sonnyp/Junction/pull/16
I think there is simpler way to accomplish this by introducing config where urls are matched against desktop entry name. I guess it's fitting to have config in json, so I'll try to have a look
It would be cool if apps could specify which URIs they can open. Maybe something like this in the .desktop file: