Support hidden files in the XDG_TEMPLATES_DIR to populate the "New Documents" right-click menu
I'm not sure where the best place to put this issue report would be, since I'm unaware if this is a problem with a freedesktop.org spec (or other standard), or instead with the implementation in Nautilus and other similar browsers, but I thought this would be the best place to open a discussion.
Right now, if I place a file beginning with a period (.) inside the XDG_TEMPLATES_DIR (typically ~/Templates), Nautilus ignores that it's there and doesn't present it as an option in the "New Document" menu that is visible when right-clicking in other directories.
Use cases
There are many times when I want to generate a specific type of new, hidden file. The couple examples that I would personally use, though not an exhaustive list, include:
- A new .gitignore file in a new git repository
- A .nomedia file to tell Android to ignore media files in a given directory
Desired behavior
Nautilus should ignore the hidden nature of these files, and present them as options for "New Documents" in the right-click menu.
Benefits of the solution
It makes it quick and easy for users to generate needed hidden files without having to create a new empty document (or having to use a "non-hidden" version of the template file), right-click, rename, and set a new name with the period at the beginning to make it hidden.
Possible drawbacks
The only drawback I can think of is that a new file generated from a "hidden" template would not be immediately visible if hidden files are disabled, however I don't anticipate this being a real issue because people who use this feature would reasonably expect such behavior.