Adding dropshadows in Fluxbox with xcompmgr

Jack Wallen
May 10, 2009
Updated • Dec 5, 2012
Linux
|
3

In my recent articles I have been covering various window managers and desktops for Linux. So far you can read about Fluxbox, Window Maker, and Xfce 4. These desktops and window managers are solid entries in the Linux desktop. But what if you want to take your Linux desktop further with a bit more eye candy? Any desktop can be made more modern looking with the simple addition of drop shadows. Although most would argue that drop shadows are fairly worthless to the desktop, they give open windows a more three dimensional, modern look which can make any desktop instantly look more relevant.

Fortunately there are composite managers that help you bring your old school desktop into the modern ages without having to lose your mind. One of those composite managers, xcompmgr, is really quite easy to use. For most window managers it's as simple as installing and running a command with desired arguments. Let's take a look at how this is done.

Getting and installing

Xcompmgr will most likely be found in your distributions repositories, so you can just open up your Add/Remove Software utility, do a search for "xcompmgr", select the results, and apply the changes. Or, if you prefer the command line, you can install xcompmgr with a command like:

sudo apt-get install xcompmgr

or

yum install xcompmgr

NOTE: The first is a Ubuntu-based command the second is a Fedora-based command. When using the Fedora command you will have to have root permissions.

Once installed, you are ready to go.

Basic usage

The syntax of the xcompmgr command is simple:

xcompmgr OPTIONS

Where OPTIONS is a single letter or group of letters representing various options.

The options

Here is a list of the more useful options used in xcompmgr:

-r Specify the blur radius for the shadows.

-o Specify the opacity for the shadows.

-l Specify left offset for shadows (default is right offset.)

-t Specify top offset for shadows (default is bottom.)

-I Specify the opacity change between steps for fading in.

-O Specify the opacity change between steps for fading out.

-c Soft shadows with translucency support.

-f Enable smooth effects for transient windows in hiding and restoring. Only used in conjunction with the "c" option.

-C Disable shadows for panels and docks. Only used in conjunction with the "c" option.

-D Specify time (in milliseconds) between steps in a fade.

Before and after

Figure 1
Figure 1

Let's take a look at before and after shots of the same desktop with and without the use of xcompmgr.

Figure 1 shows the Fluxbox desktop with a few windows open (some shaded). You see no drop shadows here.

Now we'll employ xcompmgr with the following options:

xcompmgr -c -r10 -F -f -D5 -C -o0.8 &

As you can see there are some numerical values with the options. Here's what they mean:

r10 - Radius of 10 pixels.

D5 - 5 millisecond fade

o0.8 - Not sure what value this represents, but I know the default is .75. Play with anything between these and you'll find a setting to your liking.

NOTE: The & is added to the end of the command so you can get your bash prompt back. Otherwise you wouldn't be able to u

Figure 2
Figure 2

As you can see, in Figure 2, the desktop has an added dimension it didn't have before. It adds just enough eye candy, without taking a hit on your performance, to keep people from saying "Your desktop is old-school UNIX!"

Make it stick

The easiest way to make this stick is to make use of the .xinitrc file. This file will start your window manager exactly how you want it. If you are using Fluxbox your ~/.xinitrc file would look like this:

xcompmgr -c -r10 -F -f -D5 -C -o0.8 &

exec fluxbox

Of course, when using .xinitrc, you would have to not use your graphical log in and then use the command startx to start your window manager.

Final thoughts

No, it won't make you a better user, programer, or win you any awards; but xcompmgr can at least make your desktop look more like it belongs in the current era.

Advertisement

Previous Post: «
Next Post: «

Comments

  1. radek said on August 4, 2012 at 6:31 pm
    Reply

    -o states for opacity, also worth mentioning options are -t -l : top/left offset position. Quite a nice tool it is, yet i dont know why it messes my terminals transparency (im using xfce4-terminal inside of fluxbox lol). Simple way to workaround this is just setting a your desktop background as centered background image in xfce4-terminal and adjusting opacity to make it look like transparent.

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.