December 98 IssueHowto Create themes for KDEOr more accurately, KWM, KDE's window manager. by George Russell First of all, what is a KDE theme? Well, it is a collection of pixmaps for window decorations. It can also include pixmaps for the window buttons, or a subset of them, titlebar backagrounds, a pixmap for use as a panel background, wallpaper, a colour scheme or even a sound scheme, and of course, instructions on the rc file edits and installation needed. For window borders, you must supply 8 pixmaps. If you do not want pixmapped borders at one side, then you make that side use a transparent pixmap. If you want to use less than 8 unique pixmaps, copy one into another filename. (e.g. cp top.xpm bottom.xpm to use the same image for top and bottom borders.) In KDE 1, any names could be given to the pixmaps, so long as they were specified in the kwmrc file. In KDE 1.1 this will not be the case - the filenames are set, to simplify theme installation. The themes at http://kde. themes.org/ will be to the KDE 1.1 standards. Those at my own page, are for KDE 1.0. Details of the changes to the theme standards can be found in the changelog for kwm, available from the KDE web cvs, in the kdebase / kwm section. The web cvs is l inked from http://www.kde.org/ KWM uses a set of pixmaps for its buttons. You can create themes which use no buttons, only some buttons (i.e. those you replace) or all new buttons. The pixmaps used are in /opt/kde/share/apps/kwm/pics and are overidden by putting pixmaps of the same na me in ~/.kde/share/apps/kwm/pics. The buttons displayed by kwm are set in the [Buttons] section of kwmrc in the format Buttonc=off . KWM allows a number of styles of titlebar decoration, plain, horizontal / vertical gradients, and pixmapped. Choose which looks best with your theme and include the kwmrc excerpt to use this, setting the TitlebarLook=plain line to whatever you want. In KDE 1.1, the names of pixmaps for titlebars are set - inactivetitlebar.xpm and activetitlebar.xpm. In KDE 1.0, you are allowed any filename which is specified in kwmrc. Again, check the changelogs for details. KDE 1.1 adds some more features to KWM configuration - it is possible to specify the font to be used in window titlebars, and the alignment of text in the titlebar. Your themes should ideally come with a colour scheme. These are created using the K control center module for Desktop / Colours. Saving the colour scheme creates a file with a kcsrc extension in the ~/.kde/share/apps/kdisplay/color-schemes directory. To set a pixmap as a texture for use in the panel, add the line below to kpanelrc .
BackgroundTexture=panel.xpm To set wallpaper, just include the wallaper file with the themes, and let it be installed by the user with the GUI preference tools for the desktop. To create the pixmaps, you can use gimp or xv, or another tool of your preference. The pixmaps should be saved as .xpm format, and this means that they must be converted from RGB to indexed format. If using gimp, and your image uses more than one layer, you must merge all visible layers. Flattening an image doesn't work correctly is transaparency is used. Checking the image format is thefirst thing to do if a theme you make does not work. One pitfall is the sizing of pixmaps. If incorrect, it can lead to rather odd displays. The width of a side pixmap must be the same as the width of a corner pixmap. The height of a top or bottom pixmap must be the same as the height of the corner pixmap s. That can be done by using transparancy, to make it look like the heights and widths are not the same. It is possible not to do this. In my first theme, I had a square corner pixmap twice the width of the side borders and twice the height of the top borders, which meant that a different quarter of the corner image was shown at each corner. It wasn't intended, but it looked quite good, so I left it. Pixmaps can be repeated in borders, which can lead to unintentional effects if windows are resized with a theme which uses pixmaps not suitable to tiling. Of course, if it looks good when tiled, or you want repeating patterns, this allows y ou to use smaller images. If you want to create a theme, the easiest way is download a theme, and change the images, and see what the theme does. Then package it up in a tar.gz file, and submit it and a screenshot to http://kde.themes.org/
Further links for KDE themes. |