How do I modify entries in the "Create New" context menu action in Dolphin?

Currently, in the “Create New” context menu action, I see the following options:

  • Folder
  • Text File
  • Empty File
  • HTML File
  • Link to Location (URL)
  • Link to File or Directory
  • Link to Application

How would I remove the “HTML File” entry? I presume that, for creating new entries, I simply need to add them to the ~/Templates directory, but I can’t find any documentation to officially confirm it.

This is not how it works in KDE (currently, this is being worked on).

You could find answers on the internet, to your choosing:

Some official documentation would be better still.

Hi Kalcifer

I use Plasma 5.x

I ignore the stock “Create New” entry and made my own in
/usr/share/kservices5/ServiceMenus/COPY-BACKUP-CREATE.desktop

[Desktop Entry]
Type=Service
ServiceTypes=KonqPopupMenu/Plugin
MimeType=all/all;
Icon=format-currency
Actions=sendDesktop;
X-KDE-Priority=TopLevel
X-KDE-StartupNotify=false
X-KDE-Submenu=COPY-BACKUP-CREATE

Actions=1;2;3;4;5;6;7;8;

[Desktop Action 1]
Name=COPY WITH TIMESTAMP
Icon=password-copy
Exec=cp -rf %f "%f-$(date +%y-W%W-%e_%H-%M-%S-%b)"

[Desktop Action 2]
Name=SELF-EXTRACT-ARCHIVE-HERE
Icon=password-copy
Exec=makeself.sh --notemp %f %f-$(date +%y-W%W-%e_%H-%M-%S-%b).run "SFX archive" echo "Vektor, please close this terminal"

[Desktop Action 3]
Name=BACKUP WITH .BAK
Icon=password-copy
Exec=cp -rf %f %f.bak

[Desktop Action 4]
Name=RESTORE .BAK files-only
Icon=password-copy
Exec=filename=%f; cp %f "${filename%.*}"

[Desktop Action 5]
Name=NEW FOLDER WITH TIMESTAMP
Icon=password-copy
Exec=konsole --workdir %f -e mkdir "$(date +%y-W%W-%e_%H-%M-%S-%b)"

[Desktop Action 6]
Name=NEW TXT FILE WITH TIMESTAMP
Icon=password-copy
Exec=konsole --workdir %f -e touch "$(date +%y-W%W-%e_%H-%M-%S-%b).txt"

[Desktop Action 7]
Name=NEW EMPTY FILE WITH TIMESTAMP
Icon=password-copy
Exec=konsole --workdir %f -e touch "$(date +%y-W%W-%e_%H-%M-%S-%b)"

[Desktop Action 8]
Name=EMPTY-DIRECTORY-STRUCTURE-2-DESKTOP
Icon=password-copy
Exec=bash -c "find -type d | cpio -pd /root/Desktop/EMPTY-DIRECTORY-STRUCTURE-$(date +%y-W%W-%e_%H-%M-%S-%b)/"

I have quite a few to do other things if you are interested. Let me know.

Vektor

With KDE Frameworks 6.7+, you can just add files or folders to XDG_TEMPLATE, usually ~/Templates. And the files in this folder will be shown in the “Create New” menu.

You can set the template folder path in systemsettings, like ~/.Template to hide it by default.

https://bugs.kde.org/show_bug.cgi?id=191632