Maybe some of you will find it useful.
Happy to answer any questions.
I've only been using Linux for a few weeks but what am I missing here?
I set a bunch of mime types in `~/.config/mimeapps.list` which are assigned to desktop apps and they all open perfectly with `xdg-open` or when I launch them through a file manager.
It is documented in the XDG specification https://specifications.freedesktop.org/mime-apps/latest/file....
There are gotchas, for instance Chrom,{e,ium} insists on XDG_DESKTOP_DIR != XDG_DOWNLOAD_DIR.
See this bug report from a confused user: https://issues.chromium.org/issues/41076564
This isn't an XDG issue. It's a chromium engineers being silly pricks that think they know better than the power users who obviously went out of their way to create such a configuration. Also I bet it would work if you set your XDG_DESKTOP_DIR to ~/Download/
I’d have to look into your specific case but `gio mime` and `gio open` do the right things.
I always alias open to xdg-open, it’s so useful to open a file directly from the terminal.
The same goes with aliases. Why not just use the actual commands. You give it your best shot, and sometimes something good comes out. And sometimes it's crap. That's life.
And I made it for fun and to learn something. And it wasn't AI coded. It's like 200 lines. I wanted to learn termbox2.h a bit more than I already had.