How about derivative MIME-types from "inode/directory", is it already doable?
Nikita Zlobin
cook60020tmp at mail.ru
Wed Oct 23 15:25:59 UTC 2019
I'm using Go-For-It as Todo editor. Initially it suported single list,
but allowed to setup its dir, where two files presented - for todo and
done. For quick experiment I managed to make it accept todo dir as
argument and run multiple windows, but with per-dir instances. For now
upstream implemented multiple lists in own way - sure, at least now
adding listdir argument support should be only easier...
So, my idea, is that dirs just like files (plain text) could have
derivated types. I faced unexpected cases several times, when dir,
clicked in fm (thunar or pcmanfm, not sure), opened instead in some
other alternative apps (from Open With... list), such as file
properties, baobab disk usage analyzer, and even git gui browser (qgit).
In case of todo.txt dirs it just asks to become special subdir type.
Another example - any applications, also storing projects in
directories, such as DAW (digital audio workstation) or video editing
environments. Although later usually have central file with
app-specific mime-type inside of dir, the dir itself could have type,
derivative from basic inode/directory.
I tried to setup action to open todo dirs in my modification of
Go-For-It, but since I did not use same exact name for them, I had to
set it for any dirs (having names, such as _Todo.txt or 0_todo.txt, and
now even inventing todo.txt_wip in same dir as per-home Todo.txt).
As example of multiple todo.txt uses, I considered them to be good to
place inside project dirs of any types, so that they could be opened
both by text editor (at least todo.txt file, if not all *.txt at once)
or its special app, if installed, and possibly replace or assist
TODO and DONE files inside sources dir, at least used by developers
(of course, should be in .gitignore or similar than).
As for detection way - just like regular file based types are
identified not only by names, but also content signature, dir-based
also could have some sort of signature - e.g., files with
required/denied naming, signatures or just MIME-types (e.g., for ardour
project dir it should have central ardour-type file inside, and for
mentioned Go-For-It with {todo,done}.txt files inside could be both
plain-text files with these exact names.
More information about the xdg
mailing list