Wednesday, November 14, 2007

Making Menu Transparent using Compiz

Compiz brings a lot of bling to the Linux desktop, but with such an
extensive selection of configurable features, it can sometimes be
difficult to figure out how to take advantage of specific
functionality. Several readers have asked me how to use Compiz to make
menus and tooltips transparent, so I figured I'd share this trick with
the Open Ended audience.

In order to set up menu transparency, users will need the Compiz
Config Settings Manager, which can be acquired on Ubuntu by installing
the compizconfig-settings-manager package. Users can launch the utility
from the command line or from the GNOME Preferences menu. The settings
manager contains a number of tiles that provide access to various
plugins and features included in Commpiz. To set menu transparency,
select the General Options tile and navigate to the Opacity Settings
tab. Expand the Window Opacities section and click the Add button. A
small dialog window will open and prompt for window specification and
the desired opacity.

In the Opacity Windows text field, you have to input a
pipe-separated list of window types to which you want to apply the
transparency. I use the following string:

Tooltip | Menu | PopupMenu | DropdownMenu

Then I set the Opacity Window Values field to 90 to indicate that
windows of the previously specified types should be 90 percent opaque
and 10 percent transparent.

You can also use more elaborate window matching strings that use
window class, role, and title. For instance, I like to make all of my
Pidgin conversation windows slightly transparent, but not the buddy
list. In order to do that, I assign 95 percent opacity to all windows
that use the Pidgin class and use the buddy list window title to
exclude it from the match list. This is the string I use in the Opacity
Windows text box for my Pidgin transparency:

class=Pidgin & !title=Buddy List

You can also use these window matching strings with the Compiz
Window Rules plugin to automatically make certain windows adhere to
certain behaviors when they are created. For more information about
Compiz window matching rules, check out the documentation at the Compiz wiki.