Theme Tutorial

Okay, before we start, a few assumptions:

1) You do, in fact, have WindowMaker 0.6 or higher installed and running. Most distributions have it by default.

2) You have wmakerconf installed on your system. Usually, it can be found in /usr/X11R6/bin. You can check by running “locate wmakerconf” on the command line.

3) You have a working knowledge of the Gimp. If you’re running linux at all, it’s installed.

Let’s start with source material. Any image can be used as the basis for a theme. Try to choose one that’s relatively easy on the eyes, preferably one that’s not too busy, doesn’t have too much contrast…something you can stand to look at all day without scorching the retinas, basically. That’ll be your background. Second, decide just how much of a resource hog you want this theme to be. One of the great things about WindowMaker is the fact that it doesn’t generate much system overhead on its own. As I type this, it’s using 0.3% of my cpu and 1.3M of memory. This makes it ideal for slower computers, or computers on which you have more important things to worry about than the window manager.

For older computers, a gradient-based theme is simplest. With a gradient-based theme, you specify which colors or combinations of colors WindowMaker should assign to menus, tiles, and titlebars. WindowMaker comes with several of these by default.

If performance isn’t too much of a concern, you can go with a pixmap-based theme. With pixmap-based themes, you can assign pictures to the titlebars, menu, etc. Of course, nothing stops you from going with a mixture of pixmaps and gradients.

I’ll leave the aesthetic decisions to the right-brain types, but here are a few suggestions:

1) If you’re using one large image for the background, make sure it’s large enough to cover the whole screen. Otherwise, Windowmaker will stretch it to fit, and it might end up looking like a funhouse mirror.

2) Open up your image in the Gimp and use the color picker to find the dominant colors in your image. Write these down so you can use them to specify gradients (if you’re using them) that match the background.

3) For images used as menu backgrounds and titlebars, make sure that text is readable over them. Simple images are best. If an image obscures the text, try blurring it or reducing contrast. It is, after all, a background.

4) One trick for making your tiles and bars match the background is to crop pieces out of the background image and use those. It takes practice, but it saves a great deal of time, and tends to look snertly.

Now for some theory. All themes are stored in ~/GNUstep/Library/WindowMaker/Themes/. In the /Themes directory, each theme has its own directory, in which all its relevant files are stored. A theme called Linus would be in ~/GNUstep/Library/WindowMaker/Themes/Linus.themed. In the Linus.themed directory, you’ll find any pixmaps used, as well as a text file called “style.” The “style” file contains all the instructions for the theme. Open up some of these and poke around. As you can see, they’re pretty self-explanatory.

You could, of course, hack your theme together by hand using any text editor, but we live in the twenty-first century, where machines perform all of our basic functions and we cry like ninnies when they don’t, so we’re going to use wmakerconf and save the trouble. Type “wmakerconf” on the command line to invoke this. Wmakerconf gives you alot of power over how WindowMaker operates in general, and among other things, it gives you an easy graphical frontend to the “WMRootMenu” file, which can be thorny on its own. You also have numerous options to configure window behavior and other effects.

Before some of you get your panties in a knot, yes, there is another graphical tool called WMPrefs that does much the same. Use whichever you like. I’m a creature of habit (and darkness. Yup.), and I’ve found that wmakerconf is a little better suited for cobbling together themes.

There’s a “themes” tab, but that’s not what we’ll be using. Go to “appearance,” and you’ll be presented with four tabs. From here, it’s pretty much point-and-click. For each item you want to customize, you’re given a choice of using a solid color, gradient, pixmap, textured gradient (which is a pixmap shaded with a gradient), or none. You can also specify the font and color of the text labels for each item. To see the results immediately, just go into “File —> Save” and it will appear on your desktop. Don’t panic! Whatever theme you were using at the time has not been affected. None of these changes will be permanent until we give the theme a name later.

For each place you use an image, you’ll be given the choice of placing it centered, scaled, or tiled. For tiles and titles, a scaled image tends to look best. For your menu, you’ll want to decide whether it’s presented as one smooth texture or with bevels around each option. Choose your images accordingly.

beveled menu with bevels flat menu sans bevels

Use the “effects” tab to specify this. You can also specify the size of icon tiles here, although 64×64 should work for most people.

Once you’ve gotten everything together the way you want it, it’s time to save the theme. Do NOT use the “save current theme” option in the root menu. This only creates a “style”theme with links all over your system and creates a mess. This is the world of the future, and we’re shooting for symmetry here, people!

Assuming our theme is to be named “Linus,” open a terminal and go into ~/GNUstep/Library/WindowMaker/Themes/ and type “getstyle -p Linus”. This will automatically generate a “Linus.themed” directory and copy all neccessary pixmaps from wherever they might be strewn around your system to it.

…and that’s it. You’re done. The theme will now appear on your root menu, and you can delete any of the source material that might be cluttering up any other directories.

To get this into a packaged form (also important for doing backups), you’ll want to compress the theme. Here’s how:

1) Open a terminal. Go into ~/GNUstep/Library/WindowMaker/Themes/.

2) Type “tar czvf ~/Linus.tar.gz ./Linus.themed”.

This will create a file (Linus.tar.gz) in your home directory which is a compressed archive of all neccessary files in the theme. This file can be given to anyone who wants to install it on their system. Your original files will not be affected. You might also want to consider saving this on a floppy somewhere. Even the largest themes tend to take up less than .5 meg of space, so you can use one floppy to back up the theme and any additional files that didn’t make the cut but might come in handy later.

…and finally, don’t forget to floss.

Leave a comment

Your email address will not be published. Required fields are marked *