Next: Tool example, Up: Customization examples

#### 16.7.1 Menu example

This section provides a full example of a customization file. It creates a top-level menu named `custom menu`. This menu contains a menu item named `item 1`, which is associated to the external command `external-command 1`, a sub menu named `other menu`, etc...

         <?xml version="1.0"?>
         <menu-example>
           <action name="action1">
             <external>external-command 1</external>
           </action>

           <action name="action2">
             <shell>edit %f</shell>
           </action>

           <submenu>
             <title>custom menu</title>
             <menu action="action1">
               <title>item 1</title>
             </menu>

             <submenu>
               <title>other menu</title>
               <menu action="action2">
                 <title>item 2</title>
               </menu>
             </submenu>
           </submenu>
         </menu-example>