Chapter 10. Themes

Table of Contents
Theme basics
Advanced Theme Editing

Theme basics

This section was contributed by Justin Rebelo aka "demerol".

What is a style and how does it work?

A style is basically a theme for Fluxbox. It is a simple ASCII text file that tells Fluxbox how to generate the appearance of the different components of the window manager. They are usually located in ~/.fluxbox/styles and in the global Fluxbox share directory, which will vary depending on the method of installation used.

How do I make my own?

Start off by opening a style in your favorite text editor (I recommend vim). Look at the style, how it is structured and organized. Just looking at it will explain most of the questions you may have.

Structure of a style

The style is made up of a few major components which then have their own sub-directives. The toolbar, menu and window are the major components. The window.* directives control the appearance of your window frames, window.tab.* controls the appearance of the window tabs. menu.* controls the appearance of the popup menu that you see when you right click on the desktop. toolbar.* is the bar you will see at the top or bottom of your screen. The Slit (also called a dock, wharf, etc in other WMs) is controlled by the toolbar settings, too if you don't set its style specifically.

How do I change the appearance of the slit?

The slit usually uses the same options as the toolbar. Most of the time this should work reasonably well. If you want to specifically style the slit, there are three style directives you can use:

    slit: [texture option]
    slit.color: [color value]
    slit.colorTo: [color value]

These commands work just like those for menu, window etc. when texturing the Slit.

Can I set a background image/color?

Somewhere in the style file you might see a line with rootCommand at the beginning and it will be followed by a command to set the background color or image of the style. Fluxbox includes the programm bsetroot to set color and gradient background and fbsetbg to display images.

Can I add note/comments in my styles?

Sure, just start a line with a hash (#), a bang(!), or use C++ style comments (//).

I still have more questions...

Take a look at the styles provided with Fluxbox, you should be able to find the answer there or by trying different settings. If you still can't get it, stop by #fluxbox on OPN. My nick is demerol.