Open dajsn opened 2 years ago
Thanks for reporting the issue! I can replace %F
s with %U
s in the jaro.desktop
file.
Long answer:
I've been using jaro
since I created it and I found that the jaro.desktop
approach for redirecting xdg-open
to jaro
has many flaws. .desktop
files are quite limited and it causes problems like the one you described above. I recommend simply linking xdg-open
to jaro
so that jaro
can work without any middleman. Of course, this approach may break some stuff in your system, so you have to be careful while doing it. Here are some recommedations:
xdg-open
binary, simply add another xdg-open
file that is linked to jaro
(or simply rename jaro
file to xdg-open
) somewhere in the path where it can shadow the real xdg-open
binary. (Say that PATH=A:B:C
and xdg-open
is in the folder B
, add this new xdg-open
file that is linked to jaro
to folder A
so that it'll shadow the real xdg-open
)jaro.desktop
and maybe redirect everything that does not match in jaro
to real xdg-open
by adding something like following to associations file:(assoc
:pattern ".*"
:program "/usr/bin/xdg-open %f")
The second step may not be needed (and I'm kinda against it), I just pointed it out so that if you have any workflow that depends on xdg-open
, they'll (probably) continue to work this way.
I've been working on a rewrite to stabilize things even more and to add more features. Also this was my first Scheme project, so I'm also trying to improve the maintainability with this rewrite. Another thing is trying to make jaro
a drop-in replacement for xdg-open
. But I'm a bit tight on schedule due to personal reasons and due to my day job. Hopefully I will focus on this rewrite in the close future, until then you can try this approach if you are feeling brave and report me any problems you encounter :)
Thanks for your kind words!
Thanks for the long explanation!
I've only took the route of xdg-open
-> jaro
because i was hesitant to remove xdg-open
(since package manager would be really unhappy about it). The obvious solution with symlinking jaro
as xdg-open
and put it in PATH
before the real xdg-open
escaped me for some reason. Going with the approach now, so please scrap the %F
-> %U
idea.
Glad to hear that you are working on an improved version when you have some spare time, looking forward to it.
Please feel free to mark the issue as resolved. Maybe update the "Installation" section from the readme with you above answer to help others :)
Thanks for the long explanation!
I've only took the route of
xdg-open
->jaro
because i was hesitant to removexdg-open
(since package manager would be really unhappy about it). The obvious solution with symlinkingjaro
asxdg-open
and put it inPATH
before the realxdg-open
escaped me for some reason. Going with the approach now, so please scrap the%F
->%U
idea.Glad to hear that you are working on an improved version when you have some spare time, looking forward to it.
Please feel free to mark the issue as resolved. Maybe update the "Installation" section from the readme with you above answer to help others :)
I know im extremely late but: i currently have a script written in fennel that I named xdg-open:
#!/usr/bin/env fennel
(os.execute (.. "jaro " (table.concat arg " ")))
this "should" be equivalent to this:
#!/usr/bin/env sh
jaro $@
exept I got to write it in lisp
Thank you for the great project, hope to see the release of "jaro2.0" soon
with redirecting xdg-open call to jaro and the current
jaro.desktop
thunderbird does not work. It seems to need an%U
instead of%F
. Testing with a non-URL, e.g.xdg-open ~/test.pdf
and%U
this still works.Maybe the
jaro.desktop
should ship with%U
instead of%F
?PS: great project!