With the following code, we could ship openbox with a dynamic Fedora pipe menu.
if entry.get_type() == gmenu.TYPE_DIRECTORY:
print '<menu id="%s" label="%s">' % (entry.menu_id, entry.get_name())
elif entry.get_type() == gmenu.TYPE_ENTRY and not entry.is_excluded:
""" % (entry.get_name(), entry.get_exec())
...then, in the default menu configuration, all you have to put is:
<menu id="fedora" label="Fedora" execute="/path/to/script.py" />
I initially wrote this script for the security spin (more details here:
http://lewk.org/blog/securitylivecd), but I think many people would find it
useful. This is just a suggestion up for discussion. What do you think?
I was thinking about adding gnome menus to the default menu for some time, but
wasn't able to finish it.
There are already written some utils that we could use:
- obx-xdgmenu (not packaged in Fedora) which does the same as your script, just
written in C, but it doesn't replace character & -> & and similar, so "Sound
& Video" menu doesn't work. The script you posted probably has the same problem ;-).
- obmenu package has obm-xdg, unfortunately it doesn't seem to work well with
If you fix the problem with & character in the script and add an option to
create arbitrary menus (I think settings and preferences would be nice to have),
I'll be happy to include it.
If possible I'd like to keep openbox dependencies minimal and not add
gnome-menus (and python) to them. Do you think creating a -menus subpackage is a
good idea? A wrapper to switch between the pipe-menus and the hardcoded menus
when the subpackage is not installed would be needed.
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
I've included the script with some minor modifications in the package. Thanks!
openbox-188.8.131.52-2.fc8,obconf-2.0.3-2.fc8 has been submitted as an update for Fedora 8
openbox-184.108.40.206-2.fc8, obconf-2.0.3-2.fc8 has been pushed to the Fedora 8 testing repository. If problems still persist, please make note of it in this bug report.
If you want to test the update, you can install it with
su -c 'yum --enablerepo=updates-testing update openbox obconf'. You can provide feedback for this update here: http://admin.fedoraproject.org/updates/F8/FEDORA-2008-4207
No update for Fedora 9?
openbox-220.127.116.11-2.fc8, obconf-2.0.3-2.fc8 has been pushed to the Fedora 8 stable repository. If problems still persist, please make note of it in this bug report.