Go to the first, previous, next, last section, table of contents.

Running PLWM

PLWM, at least in the examplewm.py guise, is not very sophisticated when it comes to command line arguments. It only groks three:

Run PLWM against another display than $DISPLAY.
Enable debug messages. The argument should be a comma-separated list of debug message categories, or empty, meaning enable all messages.
Print the PLWM version.

It can be tricky at first to figure out how to have a hacking-friendly X setup, so here is a fragment of my `.xinitrc' as an example of a PLWM environment:


# Redirect error messages to a log file.  This is where PLWM
# tracebacks will go, so keep an eye on it.
exec 1>$HOME/.x11startlog 2>$HOME/.x11startlog

# Read resource database from file .Xdefaults
xrdb ~/.Xdefaults

# Set a solid color for the root window.  The modewindow will have the
# same background (set with .Xdefaults) and no border, so it will appear
# to be a part of the root.  Good enough.

xsetroot -solid darkolivegreen

# Desperately try to start some window manager
# As we start it in the background it can exit without shutting down
# the entire X server.  

(plwm || ctwm || twm) &

# Instead the X server is kept running by wmm, or if that fails, by
# xlogo. To shut down the X server we kill the wmm or xlogo window.

wmm || xlogo

How to configure WMM (see section wmm) is not obvious at first either, so here's a `.wmmrc' too (notice the tabs between the columns):

plwm    plwm &
examplewm       /home/petli/hack/plwm/examples/examplewm.py &
twm     twm &

The idea is to use a stable PLWM installed in your $PATH by default. When you are about to test some freshly hacked feature or a bugfix, simply kill off the running PLWM (C-M-Esc in examplewm.py). This will pop up the WMM window, so click on the examplewm button in it to start the development version, using modules from plwm directories next to examples.

To put the finishing touches to the configuration, we can change some fonts and colors with the `~/.Xdefaults' file:

Plwm.outline.font: -*-lucida-bold-r-*-sans-20-*-*-*-*-*-*-*
Plwm.border.color: black
Plwm.border.focus.color: grey60

Plwm.modewindow.background: darkolivegreen
Plwm.modewindow.foreground: white

Go to the first, previous, next, last section, table of contents.