Coder Social home page Coder Social logo

Comments (3)

isamert avatar isamert commented on August 23, 2024

Thanks for reporting the issue! I can replace %Fs with %Us 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:

  • Don't remove the 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)
  • Remove 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!

from jaro.

dajsn avatar dajsn commented on August 23, 2024

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 :)

from jaro.

erikLundstedt avatar erikLundstedt commented on August 23, 2024

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 :)

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

from jaro.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.