94
submitted 3 days ago* (last edited 3 days ago) by trulyrandomguy@lemmy.world to c/linux@lemmy.ml

I want to add an option under Create New to create a file of particular type. For example I use Rnote to create notes,. They have .rnote extension.

Now I create a empty file (image, 3rd option from above) with extension as .rnote , but that file when opened in the application can't be written to, because it is not a proper .rnote file, it is empty file with that extension.

How do I quickly create a proper file for rnote or any application for example libreoffice?

I am on fedora 43, kde plasma.

top 14 comments
sorted by: hot top controversial new old
[-] savvywolf@pawb.social 58 points 3 days ago

Don't know if this is true for all environments, but you might be able to just create a file in ~/Templates for it to show up in that list.

[-] umbrella@lemmy.ml 4 points 1 day ago

very underutilized feature, btw!

[-] MonkderVierte@lemmy.zip 23 points 3 days ago

At least it should, if the file manager follows XDG desktop standards. Btw, you can customize the path in ~/.config/user-dirs.dirs file.

[-] trulyrandomguy@lemmy.world 22 points 3 days ago

That does it. Thank you. 😀

[-] MentalEdge@sopuli.xyz 36 points 3 days ago* (last edited 3 days ago)

To add more file creation options, you use a Templates folder.

Just create a folder named "Templates" in your home directory. Then use rnote to save an empty rnote file in that directory.

Your right click menu to create new files should now get an option to "create" rnote files (which are really just copies of the file in the Templates folder).

You can add whatever types of files you want in Templates, and they don't have to be empty.

[-] utopiah@lemmy.ml 2 points 2 days ago* (last edited 2 days ago)

Creating a .prototype file in ~/Templates didn't work for me on KDE Plasma version 5.27.5.

Because it's my own filetype I added it in "File Associations" known types in text category, to open with Kate, Gvim, etc, just in case, but didn't help.

Is something else required?

[-] MentalEdge@sopuli.xyz 2 points 2 days ago* (last edited 2 days ago)

It's not a dotfolder. It has to be "Templates" not ".Templates".

Hence my follow-up on how to hide it.

[-] utopiah@lemmy.ml 2 points 2 days ago* (last edited 2 days ago)

Sorry typo, it's indeed ~/Templates (even verified to be sure but even has a specific icon), was already there, I didn't create it. So unfortunately still does not work.

[-] MentalEdge@sopuli.xyz 2 points 1 day ago* (last edited 1 day ago)

Looks like in plasma 5 you need to mess with .desktop files placed in ~/.local/share/templates/

[-] utopiah@lemmy.ml 2 points 1 day ago* (last edited 1 day ago)

Neat! Thanks I

  • created ~/.local/share/templates/
  • relied on examples from /usr/share/templates for .desktop files
  • linked back to the actual template file in ~/Templates and finally now getting :

fixed icon

[-] trulyrandomguy@lemmy.world 8 points 3 days ago
[-] MentalEdge@sopuli.xyz 27 points 3 days ago* (last edited 3 days ago)

If you'd like to hide the Templates folder, you can create a file called ".hidden" in your home directory.

In it, simply write "Templates".

This way the folder becomes hidden, without changing its name to add a period.

You can add additional lines with more file and foldernames, so you can keep your home directory tidy for normal use, even if stuff relies on a file or folder there not having a period in the name.

[-] anytimesoon@piefed.social 3 points 2 days ago

I had no idea you could do that! Excellent tip, thank you

[-] arschflugkoerper@feddit.org 5 points 3 days ago

this is great, thanks for that hint

this post was submitted on 02 Nov 2025
94 points (100.0% liked)

Linux

59372 readers
441 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 6 years ago
MODERATORS