Jérôme Belleman
Home  •  Tools  •  Posts  •  Talks  •  Travels  •  Graphics  •  About Me

FvwmButtons

21 Sep 2013

FvwmButtons is probably the best tool there is to design a toolbar for fvwm. Much better than FvwmTaskBar. This post describes a few useful examples.

1 Geometries

The most valuable thing to understand with FvwmButtons is how to place and size your buttons. The units which are used are arbitrary units, but don't be afraid of mapping them to pixels, so that you have full control over sizes and they relate well to the geometry you've given FvwmButtons.

You could say that everything is a button, and then there are special buttons like containers and swallows. Containers are useful to manage buttons and their sizes in a grouped way. If it's inconvenient to give each button a size that relates to the FvwmButtons geometry, use a container, give it a size instead and omit the size of its buttons.

There are two types of geometry you should take into account:

  1. The size of the button, relative to its parent.
  2. The geometry of the button (e.g. if it's a container) which describes how the children buttons should be arranged.

Here, the container takes 10 units wide, 1 unit high in the parent space. Any button created inside this container is arranged in 2 rows and 2 columns, and is sized appropriately:

*FvwmButtons: (10x1 Container(Rows 2 Columns 2))

I haven't been able to find any official documentation about the leading 10x1 kind of setting, but its behaviour is obvious. You can use it quite nicely to make buttons higher, wider, larger than others.

Note that 2×2 geometries happen to be the default, so there would have been no need to explicitly specify it here. Also be aware that it's in fact possible to add more that 4 buttons in such a geometry, and that fvwm will do something quite natural in this case (typically n×2 where n>4).

2 Templates and Configuration Management

You could use templates and configuration management systems to compute geometries more dynamically. In particular, you could take advantage of the screen resolution before generating an fvwm configuration from a template.

3 References