at commit aaecf247

1 #+TITLE: Common Lisp Window Manager
2
3 Extensible Common Lisp window manager.
4
5 How extensible? It's made out of extensions to itself, which is the only
6 way to ensure extensibility.
7
8 The base WM class, =CLWM:WM=, implements a vaguely ICCCM-compliant
9 window manager that does more or less nothing. All other functionality
10 is implemented as extensions in =CLWM-EXT=; these are all mixin classes
11 a final WM class should inherit from along with =WM=. Because there's no
12 =DEFWM= macro (yet), you have to take a bit of care to have a valid
13 class precedence list, since some mixins do inherit from others.
14
15 To use it, define your own WM class in the =CLWM-USER= package, then
16 invoke =RUN-WM= on it; this spawns a thread. You might want to use
17 =XLIB:WITH-SERVER-GRABBED= if you plan to send any X events from the
18 REPL.
19
20 =sbcl --non-interactive --load binary.lisp= assumes you have Quicklisp;
21 if you do, it builds a =clwm= binary with =CLWM-USER::MAIN= as the entry
22 point. You can pass it a user init file as the only argument, this is
23 loaded in the =CLWM-USER= package. You can invoke the =START-SLYNK=
24 helper in this file to start a Slynk server and =M-x sly-connect= to
25 your running WM.
26
27 The running WM, if any, is in =*THE-WM*=. If you need a destructive
28 restart from the REPL, there's =RESTART-WM=. Other special variables in
29 =CLWM= turn the debugger back on or print various things for your
30 hacking convenience.
31
32 The example WM is a cwm-like, though not up to parity yet. Fans of other
33 types of WM might be interested in the barebones =REPARENTING-MIXIN= and
34 =TILING-MIXIN= extensions, but they aren't really usable as-is, they're
35 just examples.
36
37 The key thing which makes =clwm= possible is CLOS: if a program is made
38 out of generic functions, every generic function is an extension point.
39 Of course, the provider of the generic functions can arrange them to
40 facilitate extensibility, and the architecture herein likely still has
41 flaws.