OPENBOX HOME

9MENU

9menu is a simple, lightweight menu, easy to set-up and configure and works well with Openbox. It should be in the repository of most Debian based distros. Install by using synaptic, or sudo apt-get install 9menu .

The user needs to create the configuration file, which is very easy to do, and the files to launch the chosen configuration. The configuration is a simple one-line bash script that the user can create with his text editor. A prototype listing the main command options is below. Additional commands accepted by 9menu can be seen by putting 9menu -help into the terminal.

#!/bin/bash
9menu -geometry
+x+y -warp -teleport -popup -popdown -bg bkgrcolor -fg foregroundcolor -font name -label name
menuitem1 menuitem2 ... --------------
end

The menu window is always just large enough to hold the menu items and a heading. However, its width is determined by the item with the longest name. So, if that item's length is shorter than the length required to see the menu heading with the chosen label, put a phony entry in the menu section with length longer than the heading length. I use a strip of dashes (----------) at the end of the menu list to accomplish this end, if necessary. See the prototype and the image of News below.

Three of the commands, -geometry, -warp and-teleport determine the placement of the menu and mouse in the display window. The entry, -geometry +x+y positions the 9-menu so that the upper left hand corner has coordinates (x,y) measured (with y positive downward) from the upper left corner of the monitor. The entry, -warp, places the mouse on the first entry in the 9-menu. The entry, -teleport, launches the menu to where the mouse is when the menu is launched. Both -geometry and -teleport are not used in the same configuration.

Similarly, the commands, -popdown and popup, are generally not both used in the same configuration. If -popup is used, then the 9menu simply exits after an item has been chosen (clicked). If -popdown is used, then 9menu iconifies itself to the taskbar, where it can quickly be relaunched if the user wants to see it to launch additional items.

#!/bin/bash
9menu -geometry "+1450+680" -warp -bg "#000045" -fg "#FF0000" -font "FreeMono-Bold-Oblique" -label "News" bbc faceb huffp maddow nation pbs nyt rt seattle ---------------
end

The meaning of -bg (background color), -fg (foreground color), -font (font name), and -label (label name), are obvious. For each menuitem, put in the exec (command) that launches it. The items in this list will appear in the menu in the order that they are listed. Thus, adding a new item or removing an old item simple requires adding or removing its exec from this list.

My special 9menu configuration for launching online news sources in a 1600x900 monitor is shown on the upper left. I name it news, make sure it is executable and save it in /usr/local/bin, which is on-the-path. Putting news in the terminal or run program will launch the menu pictured below on the left.

9menu
The News menu will always appear just above the time, which always appears in this configuration on the right side of the lower panel, and the mouse pointer (not in the picture) will always be centered over the first item ("bbc"). I generally use fbpanel, which offers a clock entry that can be configured to launch (by just right-clicking the time) an app. So I just make that app the news. Right click the time display produces the "News" submenu just above the time.
#!/bin/bash
x-www-browser "http://www.bbc.com/news/world"
end

The items in this menu are internet links, so the execs that launch them cannot be entered directly into the 9menu configuration like apps residing on the computer. Each requires a simple bash script launcher, as shown for "bbc" in the box on the right. The bbc entry is named bbc, made executable and saved in /usr/local/bin.. Similar scripts are configured for huffp, maddow, etc.

That's the story for 9menu. A simple, easy to configure, pretty, special menu available for any applications or processes that have an exec and any distribution using the Openbox Window Manager.