
Create New Template Service Menu
Source (link to git-repo or to original if based on someone elses unmodified work): Add the source-code for this project on opencode.net
A context menu item for KDE and Konqueror that automates adding Create New... menu entries from existing files. It adds a "Create Template" item to the Actions submenu of the context menu. It consists of a service menu .desktop file and a shell script.
KDE Create New Template Service Menu
This service menu removes the hassle of hand-coding Create New... menu entries. It is accessed by right-clicking regular file icons on the desktop or in Konqueror, pointing to Actions, and selecting Create Template.
It consists of a service menu .desktop file and a Bash shell script. The Create Template service menu runs a shell script that brings up two dialogs--one for choosing an icon to associate with the Create New... menu entry, and the other for entering the menu item text itself. It uses this information to write a Create New... menu item .desktop file. The shell script bases the name of the .desktop file on the name of the document file clicked on from the desktop and places a copy of the file in the .sources subdirectory of ~/.kde/share/templates.
The service menu should be placed in ~/.kde/share/apps/konqueror/servicemenus and the shell script in ~/bin.
I suggest that users first install the Simple Service Menu Installer available from http://www.kde-apps.org/content/download.php?content=23760&id=1. That service menu provides the same service for installable service menus that mine does for document templates and will greatly simplify the process of installing this service menu. After downloading that service menu just right-click on it, point to Actions, point to Install Service, and click one of the options available on the submenu. Then to install my service menu, just follow the same proceedure and place the shell script in your personal ~/bin directory.
From that point on you will have a nice, simple method of adding both installable service menus and templates to the KDE context menu.
This project is released under the terms of the GNU GPL v.2.0.
Enjoy!
If you have any suggestions or improvements, please send them to my sourceforge address. Thanks.
Scott Bicknell
sbicknel@users.sourceforge.net
14 years ago
Version 0.2.1:
1. Changed menu icons to more appropriate ones.
Version 0.2:
This version of mktemplate offers two improvements:
1. Templates can be created either in your user account or system-wide
2. File names with spaces are handled gracefully
14 years ago
Version 0.2.1:
1. Changed menu icons to more appropriate ones.
Version 0.2:
This version of mktemplate offers two improvements:
1. Templates can be created either in your user account or system-wide
2. File names with spaces are handled gracefully
dwlamb
6 years ago
Might it show up after a system reboot?
Report
uldics
12 years ago
1. I made a folder (it didnt exist before) - /home/myusername/.kde/share/templates
2. I saved my template files - this time with Open Office writer and calc in this folder
3. the "Create new" menu had two new entries at same moment, without any restarts, but they didnt work
4. so i renamed them to "ODF text document.odt.desktop" and "ODF spreadsheet.ods.desktop" and now it works!
I'm sure this works with anything single file project. But I'm tempted to experiment further - what about making folders for some "manyfilesinoneproject". There are some video editing (like make new DVD) or 3D editing programs, which have lots of files for each job.
Report
penguiniator
13 years ago
This is the service menu installer I meant to refer to above.
Report
BorgQueen
14 years ago
Report
BorgQueen
14 years ago
I do have a suggestion. Create some base templates to include with it. I'll try to create some for multimedia, scribus, OOo, and a few more over the next few weeks. If you'd like to help or want something specific (or anyone would just like to help to create a library of templates), you can find me at #arklinux, on freenode.net.
Thanks again!
Report