1. Overview
  2. Features
  3. Intended Public
  4. Configuration Files
  5. Installation and Configuration
  6. Config files samples
  7. Changelog
  8. Translators
  9. Contact

1. Overview

obmenugen is a flexible, easy to use and (really) fast static/dinamic menu generator for the Openbox Window Manager. It's written in the D 2.0 D 1.0 programming language. The dinamic menu generation feature allows you to set it up once and to have an always up-to-date menu content.

2. Features

3. Intended Public

obmenugen is for people who want to have a common menu layout, always up-to-date and with minimal efforts or user intervention. It's also very useful to generate a static menu.xml for later customization (i.e: through obmenu). If you have your own self-made menu layout (i.e: crunchbang linux users), the most probably is that you don't like obmenugen.

4. Configuration Files

5. Installation and Configuration

5.1. Short version

For those of you who just can't wait, here is a summary for a tipical "install + first time config" session:

$ tar xvjf obmenugen-VERSION.tar.bz2
$ cd obmenugen-VERSION
$ sudo cp ./bin/obmenugen.i386 /usr/bin/obmenugen            # Installing obmenugen
$ sudo mkdir /usr/share/obmenugen/                           # Creating directory to store translations
$ sudo cp -r ./translations/ /usr/share/obmenugen/           # Copying translations
$ obmenugen                                                  # Creating configuration files and setting auto-updating menu
$ nano ~/.config/obmenugen/config                            # First time configuration
$ openbox --reconfigure                                      # Reload OpenBox's configuration
$ nano ~/.config/obmenugen/exclusions                        # Optional
$ nano ~/.config/obmenugen/schema                            # Optional

Then, right-click on your desktop and there is your menu.

5.2. Long version

5.2.1. Install

$ sudo cp ./bin/obmenugen /usr/bin/
$ sudo mkdir /usr/share/obmenugen/
$ sudo cp -r ./translations/ /usr/share/obmenugen/

5.2.2. First time configuration

  1. Run obmenugen with desired params. This step is needed because obmenugen creates all the config files/dirs (even OpenBox's) if it don't found it.

    I recommend you to call obmenugen with no paramaters or with the -p parameter, which will create (or overwrite the existing) menu.xml with instructions to generate a dinamic menu each time you right-click on your OpenBox desktop:
    $ obmenugen
    
    Doing this you'll never need to touch your menu.xml file again when you change obmenugen settings or install/uninstall apps (off course, if the apps you install comes with a .desktop file).
  2. Edit config file to your needs:
    $ nano ~/.config/obmenugen/config
    
  3. Reconfigure OpenBox
    $ openbox --reconfigure
    
    Or click on the "Reconfigure OpenBox" menu option.
  4. Enjoy an always up-to-date menu (if you ran obmenugen with no paramaters or with -p)
  5. If you want to exclude any menuitem, in "OpenBox Settings" submenu, click "Edit obmenugen exclusions". The exclusions file (~/.config/obmenugen/exclusions) will be opened with the "editor" you defined in your configuration.
  6. If you want to change the menu layout, in "OpenBox Settings" submenu, click "Edit obmenugen schema". The schema file (~/.config/obmenugen/schema) will be opened with the "editor" you defined in your configuration.

Note: This is the same approach to follow if you get something wrong.

Note: If you cause an irreparable damage to any obmenugen config file, just remove it (the damaged file) and follow this steps as needed.

6. Config files samples

6.1. config

~/.config/obmenugen/config

# OpenBox Menu Generator config file
#
# Lines starting with a '#' character and empty lines are ignored.
# Keys and values are case sensitive. Keep all keys lowercase.
# Removing or commenting any config line will cause an error.

# Top Menu section
# 'terminal' and 'editor' are REQUIRED
# 'filemanager', 'webbrowser' and 'run command' are optional.
# Leaving optional values empty causes the corresponding
# menu item to be hidden, no matter what show/hide option says.
terminal = sakura
editor = gedit
filemanager = thunar
webbrowser = firefox
instant messaging = pidgin
run command = gexec

# Lock Screen menuitem
# Also leaving it empty causes menuitem to be hidden
lock command = slock

# Exit menuitem
# Giving this an empty value do not hides the menuitem
# but uses the default OpenBox action "Exit"
exit command = oblogout

# OnlyShowIn Exclusions
# There is a 'OnlyShowIn' directive in .desktop files.
# This directive is self-descriptive :)
# You can put here (in lowercase) any directive's posible value
# you want to be excluded from the menu, comma-separeted.
# Leaving this value empty won't exclude any entry by this criteria.
exclude onlyshowin = kde,gnome,xfce

6.2. exclusions

~/.config/obmenugen/exclusions

# OpenBox Menu Generator exclusions file
#
# Lines starting with a '#' character and empty lines are ignored.
# Put one exclusion per line.
# Exclusions are case sensitive and are matched against
# the 'Name' of the entry (the text that appears in menuitems).
#
# Exclusions format examples:
# ^example$  :exact match with 'example'.
# ^example   :match any string that begins whith 'example'.
# example$   :match any string that ends with 'example'.
# example    :match any string containing 'example'.

^Volume
^Qt
^KNetAttach$
^OpenJDK
^Avahi
^Recording
^TVtime
^Java
(as root)$
Safe Mode$
Extension Manager$
Printer Administration$
^Sound Recorder$
^Root Terminal$
^Mixer$
^Disc Burner$
^Brasero$
^xine$

6.3. schema

~/.config/obmenugen/schema

# OpenBox Menu Generator Schema file
#
# Each (non-empty or non-comment) line of this file must be in the form:
#   'type:options'
#
# 'type' could be one of the following values:
#   'item', 'submenu', 'sep', 'cat', 'raw', 'file'
#
# Posible values for each of this types are:
# For 'item': 'terminal', 'filemanager', 'webbrowser', 'editor', 'runcommand'
# For 'submenu': 'windowsanddesktops', 'openbox'
# For 'sep': A string representing the LABEL for the separator or none
# For 'cat': Any of the posible categories. See obmenugen --help
# For 'raw': A hardcoded XML line in the OpenBox's menu.xml file format
#    Example: raw:<item label="Linux Breakout 2"><action name="Execute"><execute>lbreakout2</execute></action></item>
# For file: The name of a file with a chunk of XML in the OpenBox's menu.xml file format.
#           The file must be in ~/.config/obmenugen/
#     Example: file:extras.xml
#
# Comments are lines begining with a # character, to the end of the line.

item:terminal
item:filemanager
item:webbrowser
#item:instantmessaging
item:editor
item:runcommand
#submenu:windowsanddesktops
sep:Applications
cat:accessories
cat:education
cat:games
cat:graphics
cat:network
cat:office
cat:development
cat:audiovideo
cat:system
cat:settings
raw:<menu id="VBoxVMs" label="VirtualBox VMs" execute="/home/pavel/.bin/vms-submenu.sh" />
submenu:openbox
sep:
item:lock
item:exit

7. Changelog

8. Translators

9. Contact

For any kind of feedbak contact me at neonskull@gmail.com.