mk.xscreens - generate an X11::Screens configfile
mk.xscreens [name] mk.xscreens > ~/.xscreens
See the references below for the role of the X11::Screens configfile ~/.xscreens. Briefly, it contains an entry for each screen size you use. Each entry defines a set of what could be simply X geometries, each keyed by a character (see xchar(1)). In general they might contain two X geometries, one in character units & one in pixel units, and two font names (normal and bold). The extra information allows the configfile to be used by terminal launchers (eg xterms(1)) as well as by xmv(1) & GUI launchers. With mk.xscreens all are given two geometries & two fonts.
mk.xscreens is an X client. It creates a configfile with one entry. This entry is suitable for the current screen ($DISPLAY or :0.0).
The entry divides the screen into columns (2 or 3 for most screens). It creates 2 arrays of geometries based on these columns. One array is just the 1 dimensional array of columns. The other is 2 dimensional, each column being divided into rows. The geometries in the 1 dimensional array are assigned characters '1', '2', etc. The geometries in the 2 dimensional array are assigned characters 'a', 'b', etc, going down the 1st column, then down the 2nd, etc.
mk.xscreens tries to use a 13-pixel font, falling back to a 10-pixel font if needed to get reasonably wide or high windows (this sometimes results in different columns having different numbers of rows).
If the entry's key is not specified on the command line, it's constructed from the screen size (something like 'mk.xscreens_1280x960'). The name isn't important in getting started with xchar(1).
mk.xscreens runs 2 xterms for a few seconds, to get the relation between pixel-relative & character-relative geometries, and the size of the window manager decorations (titlebar & other borders). It uses xprop(1) & xwininfo(1) for this.
The fonts used are old fashioned server-side fonts:
With mk.xscreens in it's current form, creating an X11::Screens configfile can still easily be too much work for the user. In particular, many people won't be able to read 10-pixel fonts, & have to adjust the configfile by trial & error, or learn more than they want to about the relation between character-relative geometries, pixel-relative geometries, & font metrics.
X11::Screens(3), xscreens(1), xchar(1)
Brian Keck <email@example.com>
$Source: /home/keck/gen/RCS/mk.xscreens,v $ $Revision: 1.24 $ $Date: 2007/07/06 14:24:10 $ xchar 0.2