Compare
e18ef641867be519e2634dcf1b4b5b1f5d5f2b8d..b9fb2e1a552a7149393d1a5bab3cefe4f2fe0c49
write README.md
Raymond E. Pasco <ray@ameretat.dev> · 2026-10-28 02:09 UTC
1 file changed,
+41
−0
added README.md mode 100644
| @@ -0,0 +1,41 @@ | |||
| 1 | + | # 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 | |
| 39 | + | point. Of course, the provider of the generic functions can arrange them | |
| 40 | + | to facilitate extensibility, and the architecture herein likely still | |
| 41 | + | has flaws.⊘ | |