1 Window Manager Themes
liquibyte edited this page 2026-11-19 16:23:31 -06:00

Window Manager Themes

The Window Manager toolkit makes themes for Openbox, Blackbox and Fluxbox. It is one theme: the Engine drop-down says which window manager the preview draws it as and Save writes it for, and choosing another converts it. This page describes the preview, dropping colors, textures and gradients, fonts, a theme's images and the jail they are read in, and saving.

Openbox Fluxbox
The Wheat preset, as Openbox draws it The Dark preset, as Fluxbox draws it

1. The preview

No window manager draws a theme without managing windows, so the preview is a program of Palette's own. It draws a desktop the way the chosen window manager draws its themes, with every part that window manager themes:

  • A focused window over an unfocused one: titles, labels, handles, grips and borders.
  • Every button state the window manager has, focused and not. Openbox has normal, hover, pressed, disabled, toggled, and toggled hovered and pressed.
  • A menu: its title, items, submenu bullets, the highlighted item, disabled items, a separator, and Fluxbox's underline.
  • Blackbox's and Fluxbox's toolbar (with Fluxbox's iconbar, focused, unfocused and empty, and its system tray) and slit.
  • Openbox's undecorated windows, window switcher and dialog buttons.

The window manager does not need to be installed. Because the preview already shows the menu, the highlighted item and hovered and pressed buttons, the Style panel's Keep open buttons are greyed for it, and it has no settings list.

2. Dropping colors

Each part's colors are zones of their own, named the way Openbox names them (window.active.title - text.color). As in all three window managers, a part's texture has one color unless it is a gradient:

  • A plain swatch dropped on a part's background makes it that solid color. Its relief, bevel and border stay.
  • Only the gradient swatch sets a gradient (below).

Every part of a new theme starts solid.

Gradients

Window manager gradients have two colors, bg.color and bg.colorTo (Openbox's SplitVertical has four, and its MirrorHorizontal goes there and back). So for the Window Manager the gradient swatch shows the Gradient panel's gradient the way the drop-down beside it takes it, drawn as that window manager draws it, and a drop gives the part exactly that. The forms the Engine's window manager does not have are greyed out:

Form Openbox Blackbox Fluxbox
Vertical, Horizontal, Diagonal, CrossDiagonal, Pyramid yes yes yes
SplitVertical, MirrorHorizontal yes
Rectangle, PipeCross, Elliptic yes yes

SplitVertical takes the gradient's start, middle and end: the top half runs from the start to the middle, the bottom half on to the end.

Textures, sizes and justify

The textures are the Style panel's other properties: bg on a part, such as Raised, Flat or Sunken; Solid or a gradient; Bevel1 or Bevel2; Border; Interlaced; ParentRelative. The sizes (border.width, padding.width, padding.height, window.handle.width, window.client.padding.width, menu.border.width), the titles' justify and the fonts are the whole theme's: they go on style by themselves, whatever is locked. See The Style Panel.

3. Fonts

Blackbox and Fluxbox styles name their fonts, and the preview draws with them:

Property What it draws Saved as (Blackbox, Fluxbox)
window.font Window titles, Openbox's switcher and dialog window.font
menu.title.font The menu's title menu.title.font
menu.items.font The menu's items menu.frame.font
toolbar.font The toolbar's labels and clock toolbar.font

A font is a fontconfig name, the family and size followed by :bold, :italic and so on, as the styles write them (sans-9:bold), or an X font name (-*-helvetica-bold-r-*-*-12-*). Fluxbox's text effects after it (:shadow, :halo) are kept and saved, but not drawn. A Fluxbox style that gives only its toolbar parts' fonts (toolbar.workspace.font, toolbar.clock.font) or its labels' (window.label.focus.font) shows those.

To set a font, choose window.font (or another) as the property in the Style panel's other properties, then a value from the list, or type one into Value, such as serif-12:bold, and press Set.

An Openbox theme has no fonts: Openbox takes them from its rc.xml. The preview still draws the fonts that are set, and they are kept for Blackbox and Fluxbox, but the themerc gets none.

4. Presets and installed themes

The presets are Blue, Graphite, Olive, Wheat and Dark. The Theme list also has the installed themes: Openbox's in the GTK theme folders (~/.themes, ~/.local/share/themes, /usr/share/themes), listed with "(Openbox)", and the styles in /usr/share/fluxbox/styles, /usr/share/blackbox/styles, ~/.fluxbox/styles and ~/.blackbox/styles, listed with "(Fluxbox)" or "(Blackbox)". Any of the three window managers' files opens with File > Open (choose All Files in the dialog to see them), and the Engine follows it.

5. A theme's images

A theme opened from a window manager's file shows its images too, read from beside it:

  • Openbox's button and bullet masks (close.xbm, max.xbm, iconify.xbm, shade.xbm, desk.xbm, bullet.xbm and their state variants), drawn in the button's image color.
  • Fluxbox's .pixmap images, in XPM, PNG, JPEG, GIF or BMP. A part's pixmap is drawn over its colors, as Fluxbox draws it, until you drop a swatch on that part.

The images are not edited; saving takes them along (see below). Blackbox has no images. After converting to another window manager, the preview draws its own glyphs instead.

Why the images are read in a jail

A theme's images come with themes anyone can have made, and taking an image file apart is exactly where a bug lets a hostile file in. So the preview never decodes them itself. It reads each image file's bytes and hands them to a worker: a separate process, locked in a jail by the Linux kernel, that can read no file at all, write nothing, reach no network, start no program and signal no process. The worker sends back only the pixels, and the preview checks every answer before it uses it.

Palette sends the theme to the window manager preview, which reads the image files' bytes and hands them to the jailed worker; the worker sends back pixels, which the preview checks before drawing

The red border is the jail. The worker gets only bytes and gives back only pixels; it never sees a file or the display.

The jail is made of two features of the Linux kernel, Landlock and seccomp. It needs Linux 5.13 or later on x86-64 or ARM64, with Landlock turned on, and nothing to install. When the jail cannot be set up, there is no weaker way: the preview draws the theme without its images rather than decode them outside the jail. A worker that crashes, hangs or answers nonsense is stopped, and the next image starts a new one.

  • An image larger than 4096 pixels on a side, or a file of 32 MB or more, is not drawn.
  • The rest of the theme, its colors, textures and fonts, is read and drawn as always.

6. Saving

Save As asks for a folder (New Folder makes one) and the theme's name, and makes <Name>/ there, with every window manager's own folder in it. Save As, Save All and Save All As all write the three (see Theme Files):

Window manager Saved as To install it, put it into
Openbox <Name>/openbox-3/themerc ~/.themes (the whole <Name> folder)
Fluxbox <Name>/fluxbox/theme.cfg ~/.fluxbox/styles (the fluxbox folder, renamed <Name>)
Blackbox (0.70) <Name>/blackbox/<Name> ~/.blackbox/styles (the file; Blackbox lists the files there)

Palette never writes over a theme it did not write, and asks before it replaces one it did. Each window manager's file is written with the nearest of what that window manager lacks: for Blackbox and Fluxbox, Openbox's SplitVertical becomes Vertical and its MirrorHorizontal becomes Horizontal; for Openbox, Rectangle, PipeCross and Elliptic become Pyramid; and Openbox's window switcher becomes the toolbar.

Images go with the theme, to the window manager it was opened from:

  • Openbox: its .xbm button and bullet masks are copied beside the saved themerc.
  • Fluxbox: its pixmaps are copied into the saved style's folder, kept where they were relative to it (usually pixmaps/), and the saved theme.cfg names them again with the same .pixmap keys. A part you dropped a color on loses its pixmap, as in the preview; buttons and bullets keep theirs. A pixmap named by a full path stays where it is.
  • Converting to another window manager takes no images, because Openbox's masks and Fluxbox's pixmaps are different kinds of image.