While customizing my new Arch and Openbox setup, I was generating menus with menumaker, but I wanted at least the Applications part of my menu to update as soon as new applications are installed. So, I needed an application specific pipe menu to fulfill this purpose.
- I went with openbox-xdgmenu, installing from the Arch User Repository using Yaourt. First, to make sure access to the AUR is setup correctly, follow the steps below:
- I followed the tutorial How to install Yaourt on Arch Linux at OSTechNix. Specifically, I followed the section Install Yaourt using a custom repository
- Also, development tools that build the software are not included in the standard Arch Linux installation, so you will need the
sudo pacman -S base-devel
- Next, we need to install openbox-xdgmenu. Below are the commands to type along with the questions that yaourt asks while downloading, creating and installing an application (colored in blue).
yaourt -S openbox-xdgmenu EDIT PKGBUILD? n Continue building openbox-xdgmenu? y Edit info.install? n Continue building gnome-menus2? y Continue installing gnome-menus2? y Enter sudo password Proceed with installation? y Continue installing openbox-xdgmenu? y Proceed with installation? y
- Install xdg-menu to generate a .menu file in the /etc/xdg directory
sudo pacman -S archlinux-xdg-menu Enter sudo password
- Generate a .menu file
sudo xdg_menu --format openbox3 --root-menu /etc/xdg/menus/arch-applications.menu > xdg-menu.xml
The above command creates a .menu script, generates a menu called xdg-menu.xml and places it in your home directory
- Open Openbox’s menu.xml (~/.config/openbox/menu.xml), and Edit it as shown below:
<?xml version="1.0" encoding="UTF-8"?> <openbox_menu xmlns="http://openbox.org/3.4/menu"> <menu id="root-menu" label="OpenBox 3"> ... <menu id="applications" label="Applications" execute="openbox-xdgmenu /etc/xdg/menus/arch-applications.menu" /> ... </menu> </openbox_menu>
So far, my understanding of things when it comes to pipe menus is not so great because the command in step four generates a static menu. That menu also includes icons, but it looks like openbox-xdgmenu only displays menus without icons (maybe someone could correct me on that). Since this tutorial achieves its purpose, which is creating a basic Applications menu that automatically updates, it is still worthwhile to write. Perhaps, I will try a new method (like an xdg-menu only solution) and write a follow up.