OPENBOX HOME

ob   OPENBOX ROOT MENU, SUB-MENUS, PIPE MENUS   ob

The default menu for the openbox windows manager, which is known as the root menu, is completely static, which means all changes in it are done manually. Right clicking on an empty spot of the desktop will launch it. This root menus that come with the lxde desktop and other systems containing openbox is generally pathetic. However, with just a little work, the root menu can be replaced with a relatively dynamic root menu, which means applications are automatically added or removed, and just about every operation involving the computer can be included on the menu. It can be made easily into much more than just an application launcher. Furthermore, it can be constructed with a series of static and dynamical submenus that will put most of the app launchers and text config files within one left-click after the root menu is launched, thus, still leaving a clean, neat desktop. The only structure that is might be quicker would be having a desktop cluttered with individual desktop and panel launchers. The purpose of this essay is to show in straight forward easy steps how to construct a viable root menu from scratch. All that is required is a text editor.

<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://openbox.org/
        file:///usr/share/openbox/menu.xsd">
<menu id="" label="" icon="">

......

</menu>
</openbox_menu>

Chart 1. menu.xml template
The root menu is determined by 2 text files, menu.xml and rc.xml. Both files are located in ~/.config/openbox/ and /etc/xdg/openbox/. The former is specific to the user and takes precedence over the latter, which applies only when a user does not have these files in ~/.config/openbox.

A template for the start and ending of any static menu.xml is illustrated in the box, Chart 1, on the right. To make a menu, root or otherwise, the user needs to choose a menu id, label, icon and create the menu substance, which is illustrated by "......" in Chart 1.

For a static root menu one always chooses menu id="root-menu" label="Openbox 3", and leaves out the icon. There can be only one root menu, and no other menu (submenu) in a configuration can have id="root-menu". Otherwise, the user can choose anything for the id, label or icon (path to icon) of additional menus (non-root menus) provided no id is used more than once.

The substance of the root-menu consists of items that launch applications, computer process information, directories, internet websites, etc - anything for which a launch code can be created - and submenus, which can be either dynamic (computer created) or static (user created). To illustrate the various possibilities, we will start by showing an example root-menu and then describe how each item comes about. Image 1 on the left is one of my root-menus, and Chart 2 on its right is the essence of the menu.xml that generates that menu.

root-menu
Image 1. root-menu
<?xml version="1.0" encoding="utf-8"?>
<openbox_menu xmlns="http://openbox.org/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://openbox.org/           file:///usr/share/openbox/menu.xsd">
<menu id="root-menu" label="Openbox 3" >
<separator label="= VISIDO =" />
<menu id="places" label="Places" icon="/usr/share/icons/places.png" />
<menu id="forums" label="Forums" icon="/usr/share/icons/forums.png" />

<menu id="devices" label="Devices" icon="/usr/share/icons/dp.png" execute="/opt/menu/obdevicemenu" />
<menu id="directory" label="Directories /" icon="/usr/share/icons/directory.png" execute="python /opt/menu/dir-menu.py" />

<item label="Aiksaurus" icon="/usr/share/icons/aiksaurus.png">
<action name="Execute">
<command>
gaiksaurus
</command>
</action>
</item>
<item label="Arachnophilia" icon="/usr/share/icons/arach.png">
<action name="Execute">
<command>
~/bin/arachnophilia/arachnophilia.sh
</command>
</action>
</item>
        ......
<separator label="SUB-MENUS" />
<menu id="bash" label="Bash Commands" icon="/usr/share/icons/bash0.png" />
<menu id="char" label="Characters" icon="/usr/share/icons/ascii.png" />
<menu id="config" label="Configure" icon="/usr/share/icons/systemtools.png" />

<menu id="desktop-app-menu" label="LXDE" icon="/usr/share/icons/applications.png" execute="/usr/bin/openbox-menu lxde-applications.menu" />
<menu id="radio" label="Radio" icon="/usr/share/icons/streamripper.png" />
<menu id="system" label="System" icon="/usr/share/icons/system.png" />
<menu id="weather" label="Weather" icon="/usr/share/icons/weather.png" execute="python /opt/menu/gweather3.py USMT0231 Fahrenheit" />
<item label="Logout" icon="/usr/share/icons/logout.png">
<action name="Execute">
<command>
/usr/lib/fbpanel/fbpanel/xlogout
</command>
</action>
</item>
<item label="Reboot" icon="/usr/share/icons/reboot.png">
<action name="Execute">
<command>
/usr/bin/vsido-exit
</command>
</action>
</item>
<item label="Shutdown" icon="/usr/share/icons/shutdown1.png">
<action name="Execute">
<command>
/usr/bin/vsido-exit
</command>
</action>
</item>
</menu>
</openbox_menu>
Chart 2. menu.xml

The separator tag allows the menu to be shown in sections. It can be used without a label (<separator />), which just puts in a horizontal line, or with a label (<separator label="LABEL" />), which shows LABEL in the menu as illustrated twice in Image 1 and Chart 2.

The applications to appear directly on the menu are entered as items, which requires a 7 line entry for each app. The format is illustrated by the 7 line entries that begin with <item label= ... in Chart 2. See, for example, the entries for Aiksaurus and Arachnophlia. For each app the user can choose any label or icon that he wishes. Icons are generally stored in /usr/share/icons/. The key to getting an application or process on the menu correctly is what's between the <command> and </command> tags. For linux applications installed by sudo apt-get, Synaptic or gdebi, it will usually be the name used to install the app. The exact command in this situation is the exec in the .desktop file that usually gets automatically installed with a linux app. These are usually put in /usr/share/applications/. For Wine applications, it will be wine path-to-.exe, and for Java applications, it will be usually java path-to-.jar. For applications launched as root, prefix the app-exec with gksudo. See the LXDE-OPENBOX Guide for more information on the subject of determining commands or execs.

The above menu example contains 20 favorite applications (includes screenshot), 11 submenus, of which 4 (Devices, Directories, LXDE, Weather) are dynamical (determined automatically by the computer) and 7 (Bash Commands, Characters, Configure, Forums, Places, Radio, System) are static (constructed by user), plus ("logout", "reboot" and "shutdown"). Any of these is removed by simply deleting its section. New ones can be added by constructing appropriate entries. Any formatting errors, punctuation or otherwise, will render the total menu inopperative, so care needs to be taken in constructing and editing menus. Submenus in the root-menu involve only 1 line and are color coded green (static) and blue (dynamic) simply to help the reader.

To have icons on your menu entries, the path to the desired icon will have to be spelled out following the pattern in the menu. I use my own icons collected over the years, putting them in /usr/share/icons, so you are unlikely to have all of the icons named in Chart 2. You can use any square .png image, usually about 64x64 in size, as an icon. Make your own and put them in /usr/share/icons.

As you can see from Chart 2, the difference between static submenu entries (green) and dynamic submenu entries (blue) is that the dynamical entries require an execute. This identifies the program that determines that submenu and what makes it dynamical. The user is the "execute" in the static submenus, and so he manually has to construct them. A program does the "execute" in the dynamical menu. Otherwise, the formats of both are identical to Chart 2. The only difference to the root-menu is that with submenus the user has no restrictions in completing menu id="" label="" icon="" execute="", provided that no two labels are the same. For example, the Characters submenu is generated by char.xml has in its heading:

<menu id="char" label="Characters" icon="/usr/share/icons/ascii.png">,

while the Devices submenu is generated by the computer program, obdevicemenu, and has in its heading:

<menu id="devices" label="Devices" icon="/usr/share/icons/dp.png" execute="/opt/menu/obdevicemenu" />.
  

All the submenu ".xml" files, such as char.xml are stored in ~/.config/openbox/, whereas the computer programs generating the dynamical menus can be in a variety of places.

<menu>
     <!-- You can specify more than one menu file in here and they are all loaded,
         just don't make menu ids clash or, well, it'll be kind of pointless -->
     <!-- default menu file (or custom one in $HOME/.config/openbox/) -->
     <!-- system menu files on Debian systems -->
     <!--<file>/var/lib/openbox/debian-menu.xml</file> -->
     <file>menu.xml</file>
     <file>/home/me/.config/openbox/bash.xml</file>
     <file>/home/me/.config/openbox/char.xml</file>
     <file>/home/me/.config/openbox/config.xml</file>
     <file>/home/me/.config/openbox/forums.xml</file>
     <file>/home/me/.config/openbox/places.xml</file>
     <file>/home/me/.config/openbox/radio.xml</file>
     <file>/home/me/.config/openbox/system.xml</file>
     ...
</menu>

Chart 3. Menu Section of rc.xml for Chart 2 menu
The programs that build the dynamical menus have to be installed on the computer. One such program is openbox-menu, which can be installed using synaptic or apt-get. Openbox-menu can launch its own menu or any menu that has a copy of its applications.menu file stored on the computer. These files are usually put in /etc/xdg/menus/. For example, the LXDE submenu in Images 1 and 2 (below) is generated by execute="/usr/bin/openbox-menu lxde-applications.menu", as shown in Chart 2. Change "lxde-applications.menu" to "xfce-applications.menu" and you will get the classical xfce menu provided a copy of xfce-applications.menu is in /etc/xdg/menus/, etc for other applications menus. Copies of ?-applications.menu for a variety of desktops can be usually found by searching the internet. Using just execute="/usr/bin/openbox-menu" will produce the default menu that comes with the openbox-menu program.

One additional edit has to be performed to complete the process in the case of a static submenu. For each menu defined by a .xml file, a line has to be added to the menu section of ~/.config/openbox/rc.xml. It basically tells openbox where to find the .xml files for the submenus. For the format for entering the appropriate submenus in Chart 2 in the corresponding rc.xml, see Chart 3.

Most Debian-based Linux Distributions come with a special Debian applications menu.xml file that often is not activated. It is generally found as /var/lib/openbox/debian-menu.xml and can be activated by removing the deactivation buttons (delete <!-- and -->, which enclose /var/lib/openbox/debian-menu.xml in rc.xml). See Chart 3 above. Add the following line in the openbox root-menu where you want the DebianApps Menu to appear (See Image 2):

         <menu id="/Debian" label='Debian' icon='/usr/share/icons/debian.png' />.

LXDE submenuDebian submenu



← LXDE Applications Menu as a Dynamical Submenu of Openbox Root-menu

Image 2.

Keybinding Menus

<keybind key="keycombo">
      <action name="ShowMenu">
          <menu>menu id</menu>
      </action>
</keybind>
<!--Keybindings for menus-->

    <keybind key="W-space">
      <action name="ShowMenu">
        <menu>root-menu</menu>
      </action>
    ></keybind>
    <keybind key="C-A-d">
      <action name="ShowMenu">
        <menu>/Debian</menu>
      </action>
    </keybind>
    <keybind key="C-A-l">
      <action name="ShowMenu">
       <menu>lxdeappmenu</menu>
      </action>
    </keybind>
    <keybind key="C-A-s">
      <action name="ShowMenu">
        <menu>xdgmenu</menu>
      </action>
    </keybind>
    <keybind key="C-A-z">
      <action name="ShowMenu">
        <menu>logout</menu>
      </action>
    </keybind>

Chart 4. Example of Menu Keybind Section of rc.xml
Attaching a keybinding to a menu requires a 5 line entry in the <!--Keybindings for menus--> section of ~/.config/openbox/rc.xml. The format for these 5 lines is shown in the box on the right. All that is required of the user is to enter any unused key combination, usually of the format, Control+Alternate+Letter, and the menu id of the menu that combination is to launch. To illustrate the above, the keybind section in one rc.xml files is shown in the box on the left. Below are images of what can appear on the desktop when the binding key combination is pressed.
lxdeappmenu
Control+Alternate+l to launch Lxde Applications Menu
xdg menu
Control+Alternate+s to launch Semplice Applications Menu

<!--Keybindings for running applications-->

    <keybind key="C-A-a">
      <action name="Execute">
         <startupnotify>
            <enabled>true</enabled>
             <name>pcmanfm-menu</name>
         </startupnotify>
         <command>pcmanfm -n menu://applications/</command>
      </action>
    </keybind>

Chart 5. Keybinding (Ctrl+Alt+a) for Pcmanfm Applications Menu

If a launch code is available for a menu, then a keybinding launcher can be established as an application. The format for an application keybinding requires 9 lines and is illustrated in Chart 5. Chart 5 is the code for assigning Ctrl+Alt+a to launch the pcmanfm applications menu, which offers a nice Category Menu, a Bookmarks Menu, a Devices Menu and a Places Menu in one package. This eliminates the need for additional pipemenus to express the last 3. It's only disadvantage is that a category's contents cannot be seen by just passing the mouse pointer on its name. You have to actually click the category to see what apps are in that category. This is similar to the popular xfdashboard menu, which is only an app category launcher, and has the additional disadvantage of occupying the whole screen when launched.

#!/bin/bash
xdotool key "ctrl+alt+a" &
exit

Chart 6. Pcmanfm-menu

A panel launcher for the Pcmanfm Menu can be created by using xdotool. Copy and paste the code in Chart 6 on the left into a text file, name it pcmanfm-menu, make it executable and put it in /usr/local/bin. The command pcmanfm-menu will now launch the menu provided this keybinding has been bound to the menu as in Chart 5. Command launchers for any menu that has a keybinding launcher can be created this way.

pcmanfm menu
Image 3. Ctrl+Alt+a: Pcmamfm AppCategories-Places-Devices-Bookmarks Menu all in One

Recent Files Pipemenu for Openbox

#!/bin/sh
echo "<openbox_pipe_menu>"
files=$(
cat ~/.local/share/recently-used.xbel | grep file:/// | tail -n15 | cut -d "\"" -f 2 | tac | while read line;
do
file=$(echo "$line")
name=$(echo -en "$file" | sed 's,.*/,,' | sed 's/%20/ /g')
echo "<item label=\"$name\">
       <action name=\"Execute\"><command>xdg-open $line</command></action>
    </item>"
done);
echo "$files"
echo "<separator />"
echo "<item label=\"Clear Recent Documents\">
       <action name=\"Execute\"><command>rm ~/.local/share/recently-used.xbel</command></action>
    </item>"
echo "</openbox_pipe_menu>"

Chart 7. Recent Files Pipemenu
recent files

Copy and paste the script in Chart 7 to any text file, name it obrecent.sh and save it in /opt/menu. If this directory does not already exist in your distribution, then create it (as root). Make obrecent.sh executable. Finally, add

<menu id="recent" label="Recent Files" icon="/usr/share/icons/recent-files.png" execute="/opt/menu/obrecent.sh ~/" />

to your root-menu where you want recent files to appear. An example is pictured on the right. Any recent file on this list can be relaunched by clicking its name. Recent Files is not present in Chart 1 above.

The script below was copied from the Sparky Linux distribution.

Characters Map

A small tool named xdotool (see LXDE-Openbox Guide) can be used to create an exec for special characters. This allows a Character Map submenu to be easily added to the root-menu. Copy, paste and save the text in Chart 8 as char.xml, and put it in ~/.config/openbox/. Put the following into the root-menu (~/.config/openbox/menu.xml) wherever you want Characters to appear:
   <menu id="char" label="Characters" icon="/usr/share/icons/ascii.png" />
Finally, put
   <file>/home/me/.config/openbox/char.xml</file>

into the menu section of ~/.config/openbox/rc.xml. For an example, see Image 1.

To enter a character on any text or document, place the cursor where you want the character to go, open up the Characters submenu and left click the desired character. If there is a capital version and that is what you want, then hold the shift key down when you click the character, just as in normal typing. I created the icons by using scrot to copy an image of the capital version of the characters from gucharmap.

I added Ascii-char software link at the bottom of the characters submenu to have easy access to characters not listed. The much heavier and more complete, but clumsier to use, Gucharmap could replace Ascii-char. See the Ascii-char image below. Ascii.exe can be downloaded from this website using wget and run using wine:

   wget http://lxlinux.com/Ascii.exe .

There is a Linux version of Ascii, but I've never had any luck running it.




You can download copies of the character icons one at a time from this website by going to

http://lxlinux.com/characters/x.png,

where x=01, 02, ..., 22, bg, less, greater. Right click each picture and follow the instructions for downloading.

If wget is installed, then coping, pasting and executing the following into your terminal should create a file, ~/characters, containing all the character icons in one step:

wget -P characters http://lxlinux.com/characters/01.png lxlinux.com/characters/02.png lxlinux.com/characters/03.png lxlinux.com/characters/04.png lxlinux.com/characters/05.png lxlinux.com/characters/06.png lxlinux.com/characters/07.png lxlinux.com/characters/08.png lxlinux.com/characters/09.png lxlinux.com/characters/10.png lxlinux.com/characters/11.png lxlinux.com/characters/12.png lxlinux.com/characters/13.png lxlinux.com/characters/14.png lxlinux.com/characters/15.png lxlinux.com/characters/16.png lxlinux.com/characters/17.png lxlinux.com/characters/18.png lxlinux.com/characters/19.png lxlinux.com/characters/20.png lxlinux.com/characters/21.png lxlinux.com/characters/22.png lxlinux.com/characters/greater.png lxlinux.com/characters/less.png lxlinux.com/characters/bg.png.

Now create a directory named characters in your icon directory:

sudo mkdir /usr/share/icons/characters,

and move the downloaded icons to it:

sudo mv characters/* /usr/share/icons/characters/.

Finish with sudo chmod 777 /usr/share/icons/characters/* .



ascii
Ascii-char

Terminal Menu

Because terminal commands have to be exact, I have found that having a submenu that can be clicked to enter at least most of a command is a big aide. So I created a submenu for many of the most-used commands. All it does is uses xdotool to do the typing for me, which I duly appreciate. The xml-file is called terminal.xml and can be downloaded from this website

wget http://lxlinux.com/terminal.xml .

Move terminal.xml to ~/.config/openbox/ and make it executable. Put the following into the root-menu (~/.config/openbox/menu.xml) wherever you want Terminal Commands to appear:
   <menu id="terminal" label="Terminal Commands" icon="/usr/share/icons/terminal.png" />
Finally, put
   <file>/home/me/.config/openbox/terminal.xml</file>

into the menu section of ~/.config/openbox/rc.xml. Image 4 below is a copy of most of Terminal Commands. The procedure for using it is to, first, open a terminal, then open the root-menu and click the Terminal Commands entry to open the submenu. Find the command you want and click it. The programmed command part should automatically appear in the open terminal. Use the computer keys to complete the command, if needed, and click enter. Of course, you can remove and add items to the submenu in the usual manner to fit your own personal needs.

teminal commands

Image 4. Terminal Command Submenu


Winfuncs Tiler for Openbox

There are several programs that can help organize (tile) the open windows in Openbox. One is pytyle, which is described at the end of After Installing Openbox; another is x-tile. However, my favorite is a simple script, which in various forms has been floating around the forums for quite awhile. It is called Winfuncs and can be downloaded from this website using wget:

    wget http://lxlinux.com/winfuncs .

Winfuncs requires that xdotool, x11-utils, wmctrl and xautoclock, all small programs, be installed. It offers the user 5 tiling modes: tile, cascade, tiletwo, select and showdesktop. Put winfuncs in /usr/local/ bin/ (on the path) and make it executable. The commands to launch the 5 modes are
     winfuncs "tile"
     winfuncs "cascade"
     winfuncs "tiletwo"
     winfuncs "select"
     winfuncs "showdesktop".
Tile divides the desktop into an even number of equal parts and places a different open window in each part, and leaves one part empty if the number of open windows is odd. See tiled. Cascade stacks the open windows in the upper-left corner of the screen as illustrated in image 5 below. Tiletwo changes the cursor to a selector, so that clicking any two windows will make them share equally the desktop. Select will tile the windows and change the cursor to a selector, so that clicking any one of the windows will enlarge and bring that window to the top while stacking the remaining windows. Showdesktop will iconofy all open windows to the taskbar and leave the desktop empty.

<?xml version="1.0" encoding="UTF-8"?>
<openbox_menu xmlns="http://openbox.org/"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://openbox.org/
    file:///usr/share/openbox/menu.xsd">
  <menu id="char" label="Characters" icon="/usr/share/icons/ascii.png">
<item label="&#224;" icon="/usr/share/icons/characters/01.png">
<action name="Execute">
<execute>
xdotool type &#224;
</execute>
</action>
</item>
<item label="&#225;" icon="/usr/share/icons/characters/02.png">
<action name="Execute">
<execute>
xdotool type &#225;
</execute>
</action>
</item>
<item label="&#226;" icon="/usr/share/icons/characters/03.png">
<action name="Execute">
<execute>
xdotool type &#226;
</execute>
</action>
</item>
<item label="&#228;" icon="/usr/share/icons/characters/04.png">
<action name="Execute">
<execute>
xdotool type &#228;
</execute>
</action>
</item>
<item label="&#232;" icon="/usr/share/icons/characters/05.png">
<action name="Execute">
<execute>
xdotool type &#232;
</execute>
</action>
</item>
<item label="&#233;" icon="/usr/share/icons/characters/06.png">
<action name="Execute">
<execute>
xdotool type &#233;
</execute>
</action>
</item>
<item label="&#234;" icon="/usr/share/icons/characters/07.png">
<action name="Execute">
<execute>
xdotool type &#234;
</execute>
</action>
</item>
<item label="&#235;" icon="/usr/share/icons/characters/08.png">
<action name="Execute">
<execute>
xdotool type &#235;
</execute>
</action>
</item>
<item label="&#236;" icon="/usr/share/icons/characters/09.png">
<action name="Execute">
<execute>
xdotool type &#236;
</execute>
</action>
</item>
<item label="&#237;" icon="/usr/share/icons/characters/10.png">
<action name="Execute">
<execute>
xdotool type &#237;
</execute>
</action>
</item>
<item label="&#238;" icon="/usr/share/icons/characters/11.png">
<action name="Execute">
<execute>
xdotool type &#238;
</execute>
</action>
</item>
<item label="&#239;" icon="/usr/share/icons/characters/12.png">
<action name="Execute">
<execute>
xdotool type &#239;
</execute>
</action>
</item>
<item label="&#242;" icon="/usr/share/icons/characters/13.png">
<action name="Execute">
<execute>
xdotool type &#242;
</execute>
</action>
</item>
<item label="&#243;" icon="/usr/share/icons/characters/14.png">
<action name="Execute">
<execute>
xdotool type &#243;
</execute>
</action>
</item>
<item label="&#244;" icon="/usr/share/icons/characters/15.png">
<action name="Execute">
<execute>
xdotool type &#244;
</execute>
</action>
</item>
<item label="&#245;" icon="/usr/share/icons/characters/16.png">
<action name="Execute">
<execute>
xdotool type &#245;
</execute>
</action>
</item>
<item label="&#249;" icon="/usr/share/icons/characters/17.png">
<action name="Execute">
<execute>
xdotool type &#249;
</execute>
</action>
</item>
<item label="&#250;" icon="/usr/share/icons/characters/18.png">
<action name="Execute">
<execute>
xdotool type &#250;
</execute>
</action>
</item>
<item label="&#251;" icon="/usr/share/icons/characters/19.png">
<action name="Execute">
<execute>
xdotool type &#251;
</execute>
</action>
</item>
<item label="&#252;" icon="/usr/share/icons/characters/20.png">
<action name="Execute">
<execute>
xdotool type &#252;
</execute>
</action>
</item>
<item label="&#230;" icon="/usr/share/icons/characters/21.png">
<action name="Execute">
<execute>
xdotool type &#230;
</execute>
</action>
</item>
<item label="&#231;" icon="/usr/share/icons/characters/22.png">
<action name="Execute">
<execute>
xdotool type &#231;
</execute>
</action>
</item>
<item label="&#8800;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8800;
</execute>
</action>
</item>
<item label="&#8804;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8804;
</execute>
</action>
</item>
<item label="&#8805;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8805;
</execute>
</action>
</item>
<item label="&#177;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#177;
</execute>
</action>
</item>
<item label="&#8734;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8734;
</execute>
</action>
</item>
<item label="&#9650;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#9650;
</execute>
</action>
</item>
<item label="&#9660;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#9660;
</execute>
</action>
</item>
<item label="&#8730;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8730;
</execute>
</action>
</item>
<item label="&#8747;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8747;
</execute>
</action>
</item>
<item label="&#8721;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8721;
</execute>
</action>
</item>
<item label="&#8719;" icon="/usr/share/icons/characters/bg.png">
<action name="Execute">
<execute>
xdotool type &#8719;
</execute>
</action>
</item>
<item label="&#60;" icon="/usr/share/icons/characters/less.png">
<action name="Execute">
<execute>
xdotool type &#60;
</execute>
</action>
</item>
<item label="&#62;" icon="/usr/share/icons/characters/greater.png">
<action name="Execute">
<execute>
xdotool type &#62;
</execute>
</action>
</item>
<item label="Ascii-char" icon="/usr/share/icons/ascii.png">>
<action name="Execute">
<execute>
wine /home/me/.wine/drive_c/"Program Files"/"RJ Ascii"/Ascii.exe </execute>
</action>
</item>
</menu>
</openbox_menu>

Chart 8. char.xml
stacked
Image 5. Stacking Open Windows

Image 6 on the right shows my upper fbpanel icon launchers for the 5 wmfuncs modes. Left clicking the T icon instantly tiles the open windows; left clicking C cascades the windows, etc.

Pcmanfm Bookmarks Pipemenu

wmfunks-pcmanfm bkmks
Image 6. Wmfuncs Modes and Pcmanfm Bookmarks Menu Panel Launchers

One pipemenu that I have found particularly time savings is a File-manager Bookmarks menu. I generally put it on a panel rather than in a root-menu, but either set-up is easy to construct. A bookmarks pipe-menu specifically for pcmanfm can be downloaded from this website:

wget http://lxlinux.com/pcmanfm-bookmarks.pl .

Move pcmanfm-bookmarks.pl to /opt/menu/, and make it executable. Next, use a text editor to create a menu, places-bookmarks.xml, as in Chart 1, using

<menu id="places-bookmarks" label="Places-Bookmarks" icon="/usr/share/icons/ultra-flat-icons/apps/scalable/bookmarks.svg" execute="/opt/menu/pcmanfm-bookmarks.pl" />.

This has an execute, so there are no items, and, of course, you will change the icon to one that is on your computer. Save places-bookmarks.xml in ~/.config/openbox/, and make it executable. Finally, put

   <file>/home/me/.config/openbox/places-bookmarks.xml</file>

into the menu section of ~/.config/openbox/rc.xml.

<keybind key="A-F1">
    <action name="ShowMenu">
        <menu>places-bookmarks</menu>
    </action>
</keybind>
Chart 9

This is sufficient to put the bookmarks menu in the root-menu as laid-out above, but if you want a desktop launcher, then an execute needs to be created. The best way to do this, and get a keybind launcher at the same time, is to create a keybind. I generally use Alt+F1 for the keybind, which requires entering the text in Chart 9 into the <!--Keybindings for menus--> section of rc.xml. Now, copy the text in Chart 6 above, changing "ctrl+alt+a" to "alt+F1", to a text file, name it bookmarks-menu, make it executable and put it in /usr/local/bin (on-the-path). The command (execute) bookmarks-menu will now launch the bookmarks menu. Use this execute to put the bookmarks menu on a panel, as illustrated in Image 6, or on the desktop for whatever your situation is.

As illustrated in Image 6, the bookmarks menu consists of 2 parts. The bottom part reflects the bookmarks entered into the Pcmanfm side panel by the user. This is done by left-clicking Bookmarks in the Pcmanfm heading and following the instructions. So these entries come and go automatically as the user chooses or deletes bookmarks. The upper part is static and built into pcmanfm-bookmarks.pl. To change them, edit pcmanfm-bookmarks.pl in the obvious manner suggested by the format.

OPENBOX HOME