<head><title>lwm - Lightweight Window Manager</title></head>
<body bgcolor="white" text="black">
<h1>lwm - Lightweight Window Manager</h1>
<a href="beaver.html"><img align="right" hspace="20" width="250" height="239" src="lwm.png"></a>
<p><i>lwm</i> is a window manager for X that tries to keep out of
your face. There are no icons, no button bars, no icon docks, no root
menus, no nothing: if you want all that, then other programs can provide
it. There's no configurability either: if you want that, you want a
different window manager; one that helps your operating system in its
evil conquest of your disc space and its annexation of your physical
<p>That paragraph has probably told you whether or not you're the
sort of person who can cope with <i>lwm</i>. Welcome to my world!
<p><i>lwm</i> allocates input focus using a lazy focus-follows-mouse
system. That's to say: if the mouse is not over the root window then
the window in which it finds itself has input focus.
<p><I>lwm</i> decorations are exceedingly simple. You can see them all in
the picture. Most windows visible will have a grey border a few pixels
thick all the way around.
<p>The window with input focus (for pointer events) has a black
border rather than a grey border. The window with input focus
will be the last window that the pointer entered that was capable
of accepting input. This distinction may be made by a filled text
cursor (as with <i>xterm</i>, for example).
<p>A button 1 click on a window frame brings that window to the top.
Dragging button 1 on the frame of a resizable window repositions that
edge of the window. If a corner rather than an edge is dragged, then
both edges forming the corner are repositioned. While you're reshaping a
window, a little window pops up to show you the window's current size.
<p>In the default configuration, button 1 on the root window does
<p>Button 2 is used to drag a window by its frame, repositioning the
window but maintaining its position in the window stack.
<p>In the default configuration, button 2 on the root window brings up
a new shell.
<p>A button 3 click on a window frame makes that window disappear.
Don't worry because...
<p>Pressing button 3 on the root window brings up a menu. The various
items unhide the named hidden window.
<p>A button 3 click in the frame while Shift is held down pushes the
window to the back, under any other windows. (Users with 4-button mice
are encouraged to use their fourth button for this function.)
<p>A click with any button inside the little white box in a window's
frame can be used to close the window.
<h3>Configuration via X resources</h3>
<p>I lied when I said that you can't configure <i>lwm</i>. The sort
of people who judge a program by the number of switches and resources
it has won't be satisfied, but <i>lwm</i> does in fact recognise the
following X resources:
<tr><th></th><th align=left>Class</th><th align=left>Description</th></tr>
<tr><td><b>titleFont</b></td><td>Font</td><td>font used in window titles</td></tr>
<tr><td><b>popupFont</b></td><td>Font</td><td>font used in popup window (menu/size indicator)</td></tr>
<tr><td><b>border</b></td><td>Border</td><td>width in pixels of window borders</td></tr>
<tr><td><b>button1</b></td><td>Command</td><td>program spawned when button 1 is clicked on the root window</td></tr>
<tr><td><b>button2</b></td><td>Command</td><td>program spawned when button 2 is clicked on the root window</td></tr>
<p>In addition to these ample facilities, there exists a powerful
configuration tool called <i>gcc</i>.
<p>This program's philosophy is based on no particular window
manager, but inspiration has come from numerous sources.
The general window hiding was first seen in Rob Pike's
<i>8½</i> windowing system for Plan 9 (see his paper <a
the Plan 9 Window System</a>). The use of the right-hand button
for hiding (rather than a menu of window operations as seen
in <i>8½</i>) came from experience of John Bradley's
<a href="http://www.trilon.com/xv">xv</a>. The disappearing
title-bars that <i>lwm</i> used to sport came about from a
misunderstanding of BeOS' method of
iconizing windows, and were removed when I decided that they
were an annoying gimmick. The changing of cursor shape while reshaping
is based on SGI's <i>4Dwm</i>. The "box" in the top-left corner
of the frame is meant to look like Pike's acme (see his paper <a
href="http://plan9.bell-labs.com/plan9/doc/acme.html">Acme: A User
Interface for Programmers</a>; if you want something like acme for Unix,
try Gary Capell's <a href="http://www.cs.su.oz.au/~gary/wily/">Wily</a>).
The automatic window placement heuristics are simple but effective, based
upon personal experience. It would be nice to have a window manager that
does more window management for us.
<p>The code is at heart a rewrite of <i>9wm</i> by David Hogan
(see <a href="http://dhog.g7.org/dhog/9wm.html">The 9wm Page</a>) and
the real thanks must go to him. It was seeing <i>9wm</i> that made me
think that writing a window manager wasn't such a ridiculous idea. I'd
already written a window manager similar to <i>lwm</i> for Plan 9, based
on <i>8½</i> - it seemed sensible to start the X version from
a window manager with a similar outlook.
<p>I'd long thought about writing a window manager (since 1993, in fact),
but seeing the size of <i>twm</i> (and even <i>uwm</i> is larger than both
<i>9wm</i> and <i>lwm</i>) put me off. <i>9wm</i> showed that a useful
window manager doesn't need to be huge in either source or binary.
<p>The O'Reilly books <i>Xlib Programming Manual</i> and <i>X Protocol
Reference Manual</i> (volumes one and zero respectively in their series
of books on the X Window System) were invaluable to me while writing
<i>lwm</i>. Thanks to Adrian Nye for his brave effort to make sense of
<p>The following were brave enough to use <i>lwm</i> very early on,
and proved a great source of encouragement and ideas: James Carter,
Mawuli Lodoh, Stephen Parker, Al Smith, and Marcel Ward.
<p>Various people have contributed bug fixes; see the source for details.
<p><i>lwm</i> is freely available under the terms of the
<a href="http://www.gnu.org/copyleft/gpl.html">GPL</a> and is
available for <a href="lwm.tar.gz">download</a> here.
It's about 20 KBytes worth of gzipped tar file. If you try
<i>lwm</i>, please mail me to let me know how you get on - whatever
you think of it. If you have problems compiling or using <i>lwm</i>,
have a look at the <a href=lwm_faq.html>lwm FAQ</a>.
<p>There is also a <a href="lwm-1.01.tar.gz">slightly newer version</a>
for the curious (and hey, you have to be curious to use <i>lwm</i>). Read
the documentation therein to see what's different.
<p>"Elliott Hughes" <<a href="mailto:email@example.com">firstname.lastname@example.org</a>>