Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / lib / konq / SERVICEMENUS
blobec562300307c8207a584a063fc7e04b680b3a32b
1 This file explains how to add an item in the popupmenu (for both
2 konqueror and kdesktop), without using the file associations.
4 Why
5 ===
6 One reason for doing this is being able to associate
7 some action with all files without this action becoming a default handler
8 (called on left click).
9 Another is that for text-based programs and tools (e.g. gzip) it's faster
10 than defining a desktop file for the application, making it hidden, and
11 associate it with the relevant file types.
13 How
14 ===
15 Create a file ~/.kde/share/kde4/services/ServiceMenus/something.desktop
16 and write into it something like (without the comments) :
18 [Desktop Entry]
19 ServiceTypes=KonqPopupMenu/Plugin,text/html,text/plain # use all/all for all entries
20                                   # all/allfiles for files only
21                                   # and use inode/directory for dirs only
22                                   # you can also do things like image/* for all
23                                   # image mimetypes
24 Actions=gzip;mail                 # those are ';' separated, per the standard !
25 X-KDE-Submenu=Menuname            # this optional entry allows grouping the 
26                                   # entries in this servicemenu file into a
27                                   # common submenu, in this case "Menuname"
28 TryExec=gzip                      # Find if executable exist, if it doesn't exist
29                                   # menu entry is not displaying
30 ExcludeServiceTypes=application/x-zip # This entry is used to avoid to display menu
31                                       # when it's a specific servicetype
32                                       # for exemple when we use all/allfiles and zip
33                                       # them, we don't want to zip a zip file
36 [Desktop Action gzip]            # One "Desktop Action <name>" group per Action
37 Name=GZip this file
38 Name[fr]=...
39 Icon=application-x-tarz
40 Exec=gzip %f
42 [Desktop Action mail]
43 Name=Mail this file
44 Name[fr]=...
45 Icon=internet-mail
46 Exec=kmail --there-is-no-such-option-yet %f
49 See also the "desktop entry standard", which defines more formally the same
50 concept of actions but for desktop files (e.g. eject on a device desktop file,
51 etc.)