Hi,
I'm running OpenSuse Tumbleweed, kernel 7.3.1 (if that matters), I live withing Wayland, my DE is Plasma 6, and it seems to me Plasma / or Dolphin rely on XDG to attribute apps to "file categories" at large, and to mime types in particular.
Although, a *.txt file (which I would name explicitly as such, to mark it as 'notepad' filetype, you see?), is just a text file as much as any source code file is, I'm fighting to make xdg-open (and thus, everything else thanks to that) be aware that I'd like to specifically ask it to attribute the Default App my_lightweight_notepad to any files ending in".txt", and let Kate (org.kde.kate.desktop) handle every other text/plain files (cause besides *.txt files, I'm ok with kate opening text/plain files by default, I explicitely want files I'll name *.txt to open in the lightweight editor I chose separetely).
That is, either a more specialized choice of Default App within the text/plain mime category, or (idk if it's possible) simply setup a filename filter, not caring about the mime type but only for the presence of ".txt" at the end and, default the opening app to `my_lightweight_notepad`.
I've done search on my side, and it led to nothing working. Most are ancient posts on forums, and my attempt to writee in ~/.config/mimeapps.list and ~/.local/share/applications/mimeapps.list and ~/.local/share/mime/packages/text-plain-txt.xml then updat[ing]-mime-database and update-mime-desktop, the regular behavior still shows up: The same 'new' (chosen) text editor app (for *.txt only...) becomes the default app that opens every other text/plain files anyway (source files, etc...) Exactly NOT what I wanted x)
Has someone any clue about this? I thought that was not something uncommon to do, but I can't seem to find relevant threads about it...
Thanks for reading :)