How can I add items to Dolphin's 'New' sub menu?

When I right click on a folder in Dolphin I get the context menu menu

image

and when I click on ‘New’ the following menu appears

image

How can I add items to the file types e.g. “Python module …”?

[SOLVED]

No changes since plasma 5 :wink:

create (if not exists) ~/.local/share/templates/

in this directory, create desktop file(s) - example py.desktop

[Desktop Entry]
Name=Script python
Comment=my python model
Icon=python
Type=Link
URL[$e]=Models/python.model.py

note : change url : Models/python.model.sh, for me, it’s a sub-directory in ~/.local/share/templates/

in ~/.local/share/templates/Models/python.model.py

#!/usr/bin/env python

if __name__ == "__main__":
    print("hello")
1 Like

:+1: thanks. Is it documented?

And the Python icon does not appear :thinking:

for icon if not exists, we can search :

pacman -Ql breeze-icons | grep python

text-x-python and pythonbackend is valid for breeze

or,
at you can paste new .svg icon in ~/.local/share/icons/
or,
write Icon=/home/me/some dir/python.svg


create dolphin template is documented but … where ?? (in dolphin doc)

1 Like

:+1: Thank you

This topic was automatically closed 36 hours after the last reply. New replies are no longer allowed.