[openbox] how to integrate other menu files into menu.xml/rc.xml/root-menu?
turkuting at gmail.com
Wed Sep 4 14:04:26 EDT 2013
i found the culprit:
The root menu must be defined after openbox has read all the extra
menus, so include the extra files before menu.xml in rc.xml, and if you
define extra menus separately in menu.xml, make sure the root menu comes
last in that file.
thanks a zil, i almost thought i was demented...
now i can start tinkering with app menu generators!
On 09/04/2013 11:52 AM, R. Mattes wrote:
> On Wed, 04 Sep 2013 11:00:03 +0300, turkuting wrote
>> hello all,
>> i don't usually write here, i hope i'm not interrupting any ongoing
>> topic or sth.
>> i am really asking for advice with this thing.
>> in rc.xml it says:
>> <!-- You can specify more than one menu file in here and they
>> are all loaded, just don't make menu ids clash or, well,
>> it'll be kind of pointless --> <!-- default menu file (or
>> custom one in $HOME/.config/openbox/) --> <!-- system menu files
>> on Debian systems <file>/var/lib/openbox/debian-menu.xml</file>
>> <file>debian-menu.xml</file> --> <file>menu.xml</file>
>> i remember this has worked in the past with the debian menu, however
>> i never tried with a different file. but now, on a non-debian
>> install (archlinux) i'd like to achieve that but find it impossible?
>> i think i tried every possible syntax variation, i even tried to
>> reproduce the syntax of the debian-menu.xml (every entry starts with
>> /Debian, i replaced that with /amenu, since this was the id i had
>> given that menu).
>> the ob wiki is clear and concise:
>> <!-- this links to a sub menu -->
>> <menu id="ID" />
>> i added lines like this to menu.xml:
>> <menu id="link-103844"/>
>> <menu id="appmenu" label="Appmenu" />
>> <menu id="/amenu" />
>> either the menu does not show up at all or it's just empty, no submenus.
>> i don't get errors, also ~/.cache/openbox/openbox.log does not show
>> anything helpful.
>> i even tried adding the submenu with obmenu, but the resulting
>> syntax is pretty much the same as what i did manually.
> There are several steps needed:
> 1. you need to define a menu - something like this:
> <menu id="multimedia-menu" label="Multimedia"> 
> <item label="Q-JAckControl"> 
> <action name="Execute">
> Note that to define a menu you need to give a menu element containing
> item elements.
> Once the menu is defined, you can use it as a submenu in other menus:
> <menu id="root-menu" label="Openbox 3">
> <menu id="multimedia-menu"/>
> Note that here you only need to give the menu's id.
> @developers: (ab)using one tag for both definition and inclusion
> of a menu seems like a major design flaw. Something like
> <include-menu id=".."/> would have been much clearer ...
> Sidenote: of course, this is all reinvent-the-wheel-this-time-square.
> XML does have an in-build mechanism to do the same - it's called XInclude.
> <xi:include href="b.xml/menu[@id='my-menu']"/>
> Ok, the one part that's missing: if you put you menu into a separate
> file, you need to tell OB to read this file - that's what the
> in rc.xml is for.
> HTH Ralf Mattes
> R. Mattes -
> Hochschule fuer Musik Freiburg
> rm at inm.mh-freiburg.de
> openbox mailing list
> openbox at icculus.org
More information about the openbox