Open Source

Four great pipe menus for Openbox

Marco Fioretti shows why he likes pipe menus, which make the Linux desktop much more efficient for those who do without Gnome or KDE. Here are four of his favorites.
Sooner or later, many of the people who decide to try life on Linux without Gnome or KDE find out that they are missing something that is not eye candy. Sure, they gain free screen space and, very likely, their computer runs faster than before. The problem is that some of that speed goes out of the (desktop) window when you end up doing manually something that happened more or less automatically in Gnome or KDE, if you installed and configured some plugin. Normally, that "something" is information from, or interaction with, some other local program or online service. How do you maintain that level of integration without slowing down your computer, filling the screen with panels and icons, or running some script manually in a terminal?

My favourite solution for this type of problem is to run some descendant of the Blackbox window manager like Fluxbox or Openbox, properly equipped with a tool that is, in my opinion, really cool and made on purpose to answer the question above: pipe menus. Therefore, here I will explain what pipe menus are and show, as real world examples, the four ones I like the best. I will do this with Openbox, but the rest of this post is valid with little or no modifications for its cousins too.

First of all, what are pipe menus?

The default root menu for Openbox is shown in Figure A at left. Pipe, or dynamic menus are sections of that menu that Openbox creates on the fly, by running a generic script and using its plain text output as menu entries. Of course, in order for this to happen, that output has to be formatted in the right way. Doing this isn't difficult (I'll show you how with a step-by-step example next week), but isn't really necessary: there are lots of pipe-menu scripts waiting for you in the Openbox Pipe menu page. You may install them with the Obmenu graphical interface, or by editing the Openbox menu configuration file.

The second option is so simple that may be even faster than using Obmenu: just make a copy of the default Openbox menu file /etc/xdg/openbox/menu.xml in $HOME.config/openbox/menu.xml and then add inside it two lines for each pipe menu you need. The first one declares where the script to be executed is, and assigns it a label (what you read in the menu) and an identity (how Openbox recognizes that entry):

<menu execute="/home/marco/.config/openbox/scripts/" id="email-menu" label="gmail"/>

The second line, which has a format like <menu id="email-menu"/>, must be placed in the menu listing inside menu.xml, in the same position where you want your pipe menu to appear.

My four favourite Openbox pipe menus

Enough theory! Here are the four pipe menu scripts I find most useful:

Imap mailbox checker Checkmail polls any IMAP4 server to show as an Openbox menu which messages are in your Inbox. As you can see in Figure B, checkmail shows subject, sender, and first paragraph of each message and allows you to delete it or mark it as read, all without opening any email client! For the record, there's at least one other Openbox Gmail checker around.

Figure B

Click to enlarge checkmail.
Current month calendar formats the output of the Unix cal program in Openbox-compatible format (Figure C). Very handy when you don't need to enter appointments but just to check, for example, what is the date of the last Saturday of the month.

Weather forecast Openbox Weather Pipe Menu downloads (from Google or Yahoo) and shows the current four-day weather forecast for any city you want, in four languages. Figure D shows what I get when I add it to menu.xml with "Rome" as first argument and "en" as the second.

Figure D

System monitor No geek wants to ignore how much memory his or her box is using, how much free disk space is available, how fast the network connection is and, of course, the exact uptime. How do you get that information without typing in a terminal, or consuming desktop space? In Openbox, I use Sysinfo, shown in Figure E.

Aren't pipe menus cool?

The Openbox Pipe menu page contains links to pipe menus for all needs, from control of multimedia applications like Xmms or Audacious to wallpaper configuration. I hope that these four examples are enough, however, to explain why I like pipe menus so much: they can make any Linux desktop much more efficient. You can use a very fast window manager that doesn't waste any screen space, and still run all kinds of commands, or get all sorts of real time information, with a couple of clicks or keystrokes. On top of that, all this happens through short scripts, that is without being forced to install bulky libraries and packages just to run one small applet. I like it!


Marco Fioretti is a freelance writer and teacher whose work focuses on the impact of open digital technologies on education, ethics, civil rights, and environmental issues.

Editor's Picks