conda / menuinst

Cross platform menu item installation
https://conda.github.io/menuinst/
BSD 3-Clause "New" or "Revised" License
36 stars 42 forks source link

Fix `xdg-mime` default registration #227

Closed jaimergp closed 1 month ago

jaimergp commented 3 months ago

Description

Closes #226. Instead of using xdg-mime default, we edit mimeapps.list manually. If an application is already registered as default, we won't override it. We always populate the "Added associations" list with our desktop file so it's there in the "open with" menu. We also handle cleanups now.

Checklist - did you ...

jaimergp commented 3 months ago

@mrclary could you check if this PR fixes your Linux issues? Thanks!

mrclary commented 2 months ago

@jaimergp, sorry for the late follow up. I've been sick all last week. So a few observations with this branch:

jaimergp commented 2 months ago

Perfect! I'm reading this as "it works as long as %f is present in some way", so I added a note to the docs. In that case, I think this is ready to go, right?

mrclary commented 2 months ago

Okay, I'm a bit embarrassed. I was not aware of the %f requirement, and Spyder appears in the applications list even for menuinst=2.1.1 if %f is included in the command. I apologize for the inconvenience; perhaps this PR was not necessary. Nevertheless, everything seems to be working as expected.

jaimergp commented 2 months ago

I did find a couple bugs and polished the cleanup, so no worries, it was indeed useful! Glad you made it work too.