~/.config/openbox/menu.xml
<?xml version="1.0" encoding="UTF-8"?> <openbox_menu xmlns="http://openbox.org/3.4/menu"> <!--根菜单--> <menu id="root-menu" label="Openbox Root Menu"> <!--分隔符 使用属性"label"显示标题 如果没有则显示为一条分隔线--> <separator label="Applications" /> <!--菜单中的条目--> <item label="Emacs"> <action name="Execute"> <command>emacs</command> <startupnotify> <enabled>yes</enabled> <wmclass>Emacs</wmclass> </startupnotify> </action> </item> <item label="Rxvt Unicode"> <action name="Execute"> <command>urxvt</command> </action> </item> <item label="Firefox"> <action name="Execute"> <command>firefox</command> <startupnotify> <enabled>yes</enabled> <wmclass>Firefox</wmclass> </startupnotify> </action> </item> <item label="MPlayer"> <action name="Execute"> <command>gmplayer</command> <startupnotify> <enabled>yes</enabled> <wmclass>MPlayer</wmclass> </startupnotify> </action> </item> <item label="Thunar"> <action name="Execute"> <command>Thunar</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <item label="Squeeze"> <action name="Execute"> <command>squeeze</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <item label="Evince"> <action name="Execute"> <command>evince</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <item label="Gqview"> <action name="Execute"> <command>gqview</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <item label="Sunbird"> <action name="Execute"> <command>sunbird</command> <startupnotify> <enabled>yes</enabled> </startupnotify> </action> </item> <separator /> <!--子菜单 子菜单的内容在后面定义--> <menu id="alternate"/> <separator label="System" /> <menu id="system-menu"/> <separator /> <item label="Log Out"> <action name="SessionLogout"> <prompt>yes</prompt> </action> </item> </menu> <!--子菜单内容定义 与根菜单同级--> <menu id="alternate" label="Alternate"> <item label="GVim"> <action name="Execute"> <command>gvim</command> <startupnotify> <enabled>yes</enabled> <wmclass>GVim</wmclass> </startupnotify> </action> </item> <item label="Opera"> <action name="Execute"> <command>opera</command> <startupnotify> <enabled>yes</enabled> <wmclass>Opera</wmclass> </startupnotify> </action> </item> <item label="Rox"> <action name="Execute"> <command>rox</command> <startupnotify> <enabled>yes</enabled> <wmclass>ROX-Filer</wmclass> </startupnotify> </action> </item> <item label="Xterm"> <action name="Execute"><command>xterm</command></action> </item> </menu> <menu id="system-menu" label="System"> <item label="Reconfigure"> <action name="Reconfigure" /> </item> <item label="Openbox Configuration Manager"> <action name="Execute"> <command>obconf</command> <startupnotify><enabled>yes</enabled></startupnotify> </action> </item> <item label="Xfce Settings"> <action name="Execute"> <command>xfce-setting-show</command> <startupnotify><enabled>yes</enabled></startupnotify> </action> </item> <separator /> <item label="Exit Openbox"> <action name="Exit"> <prompt>yes</prompt> </action> </item> </menu> </openbox_menu>