Hi,

Rodrigo Arias <rodar...@gmail.com> wrote:

> One of the features I would like to include is the ability to open a 
> link with an external handler. We have a proof of concept that uses
> the rule file, but I think it is too complex for now:
> 
> https://github.com/dillo-browser/dillo/pull/199

I don't know about the complexity, but it worked fine here!

> I'm thinking it may be better to add an easier variant first, that we 
> can extend later. I'm considering adding these to dillorc:
> 
> actions="default Open with external tool"
> actions="firefox Open with Firefox"
> actions="mpv Open with MPV"
> actions="mpv-audio Open with MPV (audio)"
> handler="/bin/the-handler"
> 
> Where you can define multiple "actions" but only one "handler". The 
> actions have a label at the beginning (first word) and a human
> readable text that will be presented in the menu.
> 
> Then, your handler will be invoked using the label as:
> 
> /bin/the-handler <URL> <action-label>
> 
> And you do whatever you find convenient in your handler, so you have 
> more context to decide the proper action based on the label. I think 
> this would cover most of the use cases of opening URLs with other 
> programs without being too convoluted.

Sounds good, but in that case, maybe we should provide an example
handler script in the docs, since that could be a barrier for some
users.

I'm still using a variant of this[1] patch, but with multiple
entries, which still seems to be the easiest way of allowing external
actions.

[1] https://alex.envs.net/patches/00-ext-link-handler.patch

Regards,
Alex
_______________________________________________
Dillo-dev mailing list -- dillo-dev@mailman3.com
To unsubscribe send an email to dillo-dev-le...@mailman3.com

Reply via email to