E volto mais uma vez a falar sobre o obmenu-generator, desta vez de modo a tornar mais agradável a utilização do OpenBox no Gentoo/Funtoo.

Até então eu não sabia, mas o obmenu-generator já faz parte dos repos gentoo/funtoo, por este desconhecimento eu vinha utilizando a versão 0.66 obtida via git e tinha instalado apenas as dependências: dev-perl/Data-Dump e dev-perl/Linux-DesktopFiles.
Sabendo de sua existência, a simples execução do comando abaixo se encarregará de instalar todos os pacotes necessários (dependências e programa):
$ sudo emerge -av x11-misc/obmenu-generator

Feito isto bastará configurá-lo… se deseja o menu OpenBox com ícones, tasca aí em seu terminal:
$ obmenu-generator -i -p
Mas se quiser um menu simples e sem firulas:
$ obmenu-generator -s -c
Ou via right-click no desktop, selecione a opção desejada no submenu referente ao obmenu-generator.

Como pode ser visto, além de estar em inglês, há uma referência ao Arch Linux, caso queiram seguem os 2 arquivos que deverão ser salvos em ~/.config/obmenu-generator.
~/.config/obmenu-generator/schema.pl.
#!/usr/bin/perl # obmenu-generator - schema file =for comment item: add an item inside the menu {item => ["command", "label", "icon"]}, cat: add a category inside the menu {cat => ["name", "label", "icon"]}, sep: horizontal line separator {sep => undef}, {sep => "label"}, pipe: a pipe menu entry {pipe => ["command", "label", "icon"]}, raw: any valid Openbox XML string {raw => q(xml string)}, begin_cat: begin of a category {begin_cat => ["name", "icon"]}, end_cat: end of a category {end_cat => undef}, obgenmenu: generic menu settings {obgenmenu => ["label", "icon"]}, exit: default "Exit" action {exit => ["label", "icon"]}, =cut # NOTE: # * Keys and values are case sensitive. Keep all keys lowercase. # * ICON can be a either a direct path to an icon or a valid icon name # * Category names are case insensitive. (X-XFCE and x_xfce are equivalent) require "$ENV{HOME}/.config/obmenu-generator/config.pl"; ## Text editor my $editor = $CONFIG->{editor}; our $SCHEMA = [ # COMMAND LABEL ICON {item => ['xfce4-screenshooter', 'Captura de tela', 'applets-screenshooter']}, {item => ['leafpad', 'Editor de Texto', 'leafpad']}, {item => ['dbus-launch thunar', 'Gerenciador de Arquivos', 'file-manager']}, {item => ['opera', 'Navegador Web', 'web-browser']}, {item => ['sakura', 'Terminal', 'terminal']}, {sep => undef}, {item => ['gmrun', 'Executar comando...', 'system-run']}, {sep => undef}, #{sep => 'Aplicativos'}, # NAME LABEL ICON {cat => ['utility', 'Acessórios', 'applications-utilities']}, {cat => ['settings', 'Configurações', 'applications-accessories']}, {cat => ['development', 'Desenvolvimento', 'applications-development']}, {cat => ['education', 'Educativos', 'applications-science']}, {cat => ['office', 'Escritório', 'applications-office']}, {cat => ['graphics', 'Gráficos', 'applications-graphics']}, {cat => ['network', 'Internet', 'applications-internet']}, {cat => ['game', 'Jogos', 'applications-games']}, {cat => ['audiovideo', 'Multimídia', 'applications-multimedia']}, {cat => ['other', 'Outros', 'applications-other']}, {cat => ['system', 'Sistema', 'applications-system']}, # COMMAND LABEL ICON #{sep => undef}, #{wine_apps => ['Wine apps', 'applications-other']}, #{sep => undef}, #{pipe => ['obbrowser', 'Pasta Pessoal', 'drive-harddisk']}, ## Generic advanced settings #{sep => undef}, #{obgenmenu => ['Openbox Settings', 'applications-engineering']}, #{sep => undef}, ## Custom advanced settings. {sep => undef}, {begin_cat => ['Configurações do WM', 'gnome-settings']}, # obmenu-generator category. {begin_cat => ['Obmenu-Generator', 'menu-editor']}, {item => ["$editor ~/.config/obmenu-generator/schema.pl", 'Menu Schema', $editor]}, {item => ["$editor ~/.config/obmenu-generator/config.pl", 'Menu Config', $editor]}, {sep => undef}, {item => ['obmenu-generator -p', 'Generate a pipe menu', 'menu-editor']}, {item => ['obmenu-generator -s', 'Generate a static menu', 'menu-editor']}, {item => ['obmenu-generator -p -i', 'Generate a pipe menu with icons', 'menu-editor']}, {item => ['obmenu-generator -s -i', 'Generate a static menu with icons', 'menu-editor']}, {sep => undef}, {item => ['obmenu-generator -d', 'Refresh Icon Set', 'gtk-refresh']}, {end_cat => undef}, # Openbox category. {begin_cat => ['Openbox', 'openbox']}, {item => ["$editor ~/.config/openbox/autostart", 'Editar autostart', $editor]}, {item => ["$editor ~/.config/openbox/menu.xml", 'Editar menu.xml', $editor]}, {item => ["$editor ~/.config/openbox/rc.xml", 'Editar rc.xml', $editor]}, {item => ['openbox --reconfigure', 'Reconfigurar Openbox', 'openbox']}, {end_cat => undef}, # Configuration files. {item => ["lxappearance", 'Alterar Aparência', 'preferences-desktop-theme']}, {item => ["$editor ~/.conkyrc", 'Editar conkyrc', $editor]}, {item => ["$editor ~/.config/tint2/tint2rc", 'Editar tint2rc', $editor]}, {item => ["$editor ~/.zshrc", 'Editar zshrc', $editor]}, {item => ['obconf', 'OpenBox Configuration Manager', 'obconf']}, {item => ['obmenu', 'OpenBox Menu Configurator', '/usr/share/obmenu/mnu48.png']}, {item => ['nitrogen ~/Imagens', 'Trocar Wallpaper', 'nitrogen']}, {end_cat => undef}, {sep => undef}, ## The xscreensaver lock command. {item => ['xscreensaver-command -lock', 'Bloquear tela', 'lock']}, # Replace the standard Openbox's action "Exit" with "obsession-logout" script. #{exit => ['Exit', 'exit']}, {item => ['obsession-logout', 'Sair', 'exit']}, ]
~/.config/obmenu-generator/config.pl.
#!/usr/bin/perl # obmenu-generator - configuration file # This file will be updated automatically. # Any additional comment and/or indentation will be lost. =for comment || FILTERING | skip_filename_re : Skip a .desktop file if its name matches the regex. Name is from the last slash to the end. (filename.desktop) Example: qr/^(?:gimp|xterm)\b/, # skips 'gimp' and 'xterm' | skip_entry : Skip a destkop file if the value from a given key matches the regex. Example: [ {key => 'Name', re => qr/(?:about|terminal)/i}, {key => 'Exec', re => qr/^xterm/}, ], | substitutions : Substitute, by using a regex, in the values of the desktop files. Example: [ {key => 'Exec', re => qr/xterm/, value => 'sakura'}, {key => 'Exec', re => qr/\\\\/, value => '\\', global => 1}, # for wine apps ], || ICON SETTINGS | icon_dirs_first : When looking for icons, look in this directories first, before looking in the directories of the current icon theme. Example: [ "$ENV{HOME}/My icons", ], | icon_dirs_second : Look in this directories after looked in the directories of the current icon theme. (Before /usr/share/pixmaps) Example: [ "/usr/share/icons/gnome", ], | icon_dirs_last : Look in this directories at the very last, after looked in /usr/share/pixmaps, /usr/share/icons/hicolor and some other directories. Example: [ "/usr/share/icons/Tango", ], | strict_icon_dirs : A true value will make the module to look only inside the directories specified by you in either one of the above three options. | gtk_rc_filename : Absolute path to the GTK configuration file. | missing_image : Use this icon for missing icons (default: gtk-missing-image) || KEYS | name_keys : Valid keys for the item names. Example: ['Name[fr]', 'GenericName[fr]', 'Name'], # french menu || PATHS | desktop_files_paths : Absolute paths which contains .desktop files. Example: [ '/usr/share/applications', "$ENV{HOME}/.local/share/applications", glob("$ENV{HOME}/.local/share/applications/wine/Programs/*"), ], || NOTES | Regular expressions: * use qr/RE/ instead of 'RE' * use qr/RE/i for case insenstive mode =cut our $CONFIG = { "editor" => "leafpad", "Linux::DesktopFiles" => { desktop_files_paths => ["/usr/share/applications", "/usr/local/share/applications"], gtk_rc_filename => "/home/edps/.gtkrc-2.0", icon_dirs_first => undef, icon_dirs_last => undef, icon_dirs_second => undef, keep_unknown_categories => 1, skip_entry => undef, skip_filename_re => undef, skip_svg_icons => 0, strict_icon_dirs => undef, substitutions => undef, terminalization_format => "%s -e '%s'", terminalize => 1, unknown_category_key => "other", }, "missing_icon" => "gtk-missing-image", "name_keys" => ['Name'], "terminal" => "sakura", "VERSION" => 0.61, }
No arquivo acima, a alteração do campo “name_keys” => [‘Name’], por [‘Name[pt_BR]’, ‘GenericName[pt_BR]’, ‘Name’], ou mesmo [‘Name[pt_BR]’, ‘Name’], ou ainda e somente [‘Name[pt_BR]’], não surtiu o efeito esperado, gerando algumas entradas vazias no menu (e sem ícones ou descrição), portanto, sugiro que a deixe como está!.
Com a utilização destes 2 arquivos, você terá um menu OpenBox parecido com o da 1ª screenshot.
Este menu já está configurado para utilizar o obsession como gestor de sessão (logout, restart, etc), portanto, caso queira usá-lo não deixe de ver o artigo abaixo:
How-To :: obsession no Gentoo/Funtoo
t+