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.
config
, exclusions
and schema
files, you can get exactly the menu layout you want.
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.
~/.config/obmenugen/config
: Main obmenugen configuration file. Here you will define the required settings for obmenugen and some other optional which will help you to personalize the menu. This file was renamed from $HOME/.config/obmenugen/obmenugen.cfg
~/.config/obmenugen/exclusions
: obmenugen exclusions' file. In this file you can define exclusions, one per line. See comments in file for more information on exclusions' format.
~/.config/obmenugen/schema
: obmenugen schema's file. In this file you can define your menu layout in a very flexible way. See comments in file for more information on obmenugen schema's format. This file was renamed from $HOME/.config/obmenugen/obmenugen.schema
~/.config/openbox/
. The most important of them (in this case) is menu.xml
, which is REPLACED by obmenugen. Maybe you should keep a copy of this file at a safe place before run obmenugen the first time.
obmenugen.po
[obviously in .PO format]) in: ~/.config/obmenugen/translations/<LOCALES>/LC_MESSAGES/
and /usr/share/obmenugen/translations/<LOCALES>/LC_MESSAGES/
(in that order). <LOCALES> is, for example: 'es_ES.UTF-8' or 'en_US', and is taken from $LANG
environment variable.
So, if your <LOCALES>
are 'es_ES.UTF-8' obmenugen will search for:
~/.config/obmenugen/translations/es_ES.UTF-8/LC_MESSAGES/obmenugen.po
~/.config/obmenugen/translations/es_ES/LC_MESSAGES/obmenugen.po
~/.config/obmenugen/translations/es/LC_MESSAGES/obmenugen.po
/usr/share/obmenugen/translations/es_ES.UTF-8/LC_MESSAGES/obmenugen.po
/usr/share/obmenugen/translations/es_ES/LC_MESSAGES/obmenugen.po
/usr/share/obmenugen/translations/es/LC_MESSAGES/obmenugen.po
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.
$ sudo cp ./bin/obmenugen /usr/bin/ $ sudo mkdir /usr/share/obmenugen/ $ sudo cp -r ./translations/ /usr/share/obmenugen/
-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:
$ obmenugenDoing 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).
$ nano ~/.config/obmenugen/config
$ openbox --reconfigureOr click on the "Reconfigure OpenBox" menu option.
-p
)
~/.config/obmenugen/exclusions
) will be opened with the "editor" you defined in your configuration.
~/.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.
~/.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
~/.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$
~/.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
obmenugen.cfg
to config
and obmenugen.schema
to schema
, including the needed code to done it automatically, without user intervention.
Makefile
(now you can simpy do make && make install && make clean
)
$XDG_DATA_{DIRS,HOME}
directories, recursively. This fixes a bug causing KDE apps (like K3B) not being added to menu
-s
for "Static Menu Generation". By now, it does exactly the same as if you don't pass any parameter, because, by now, "Static Menu Generation" is the default action.
obmenugen.schema
, and 'instant messaging' (yes with the space) key to obmenugen.cfg
. See config sample file and schema sample file.
--category=<CATEGORY>
and <CATEGORY>
is empty. Now returns an empty pipe_menu.
obmenugen.schema
introduced for a maximun control of the menu layout.
--category
. With this option you can ask obmenugen for generate a pipe menu with the items of a particular category.
--windows
command line parametter and various configuration keys because, since the introduction of obmenugen.schema
, they are not needed anymore.
For any kind of feedbak contact me at neonskull@gmail.com.