Compare
c63d3797b6dff30e6508a9ab6b23f1e7bc55262a..aa8250c17fb66a5a65f5fab090c9ce57d6d74327
binary build
Raymond E. Pasco <ray@ameretat.dev> · 2026-10-27 06:09 UTC
4 files changed,
+62
−0
modified .gitignore
| @@ -1,3 +1,4 @@ | |||
| 1 | + | /clwm | |
| 1 | 2 | *~ | |
| 2 | 3 | \#*\# | |
| 3 | 4 | *.fasl | |
added binary.lisp mode 100644
| @@ -0,0 +1,47 @@ | |||
| 1 | + | ;;;; common lisp window manager | |
| 2 | + | ;;;; | |
| 3 | + | ;;;; build a binary (assumes you have quicklisp): | |
| 4 | + | ;;;; sbcl --non-interactive --load binary.lisp | |
| 5 | + | ;;;; usage: | |
| 6 | + | ;;;; clwm user-init.lisp | |
| 7 | + | ||
| 8 | + | (unless (find-package '#:quicklisp) | |
| 9 | + | (load | |
| 10 | + | (merge-pathnames "quicklisp/setup.lisp" (user-homedir-pathname)))) | |
| 11 | + | ||
| 12 | + | (asdf:load-asd (merge-pathnames "clwm.asd" *load-truename*)) | |
| 13 | + | (ql:quickload "clwm") | |
| 14 | + | ;; get the stuff slynk tries to load on connect into the image | |
| 15 | + | (asdf:load-systems "slynk/arglists" "slynk/fancy-inspector" | |
| 16 | + | "slynk/package-fu" "slynk/mrepl" "slynk/trace-dialog" | |
| 17 | + | "slynk/profiler" "slynk/stickers" "slynk/indentation" | |
| 18 | + | "slynk/retro") | |
| 19 | + | ||
| 20 | + | (in-package #:clwm-user) | |
| 21 | + | ||
| 22 | + | (defun main () | |
| 23 | + | (let ((args (uiop:command-line-arguments))) | |
| 24 | + | (unless (= (length args) 1) | |
| 25 | + | (format *error-output* "usage: clwm user-init.lisp~%") | |
| 26 | + | (uiop:quit 2)) | |
| 27 | + | (handler-case | |
| 28 | + | (let ((*package* (find-package '#:clwm-user))) | |
| 29 | + | (load (first args))) | |
| 30 | + | (error (condition) | |
| 31 | + | (format *error-output* "~&clwm: error loading ~a:~%~a~%" | |
| 32 | + | (first args) condition) | |
| 33 | + | (uiop:quit 1))) | |
| 34 | + | (unless *wm-thread* | |
| 35 | + | (format *error-output* "~&clwm: ~a didn't start a WM~%" | |
| 36 | + | (first args)) | |
| 37 | + | (uiop:quit 1)) | |
| 38 | + | (uiop:quit (if (member (ignore-errors (bt:join-thread *wm-thread*)) | |
| 39 | + | '(:stopped :disconnected)) | |
| 40 | + | 0 | |
| 41 | + | 1)))) | |
| 42 | + | ||
| 43 | + | (sb-ext:save-lisp-and-die | |
| 44 | + | (make-pathname :name "clwm" :type nil :defaults *load-truename*) | |
| 45 | + | :executable t | |
| 46 | + | :toplevel #'main | |
| 47 | + | :save-runtime-options t) | |
added build.sh mode 100755
| @@ -0,0 +1,2 @@ | |||
| 1 | + | #!/bin/sh | |
| 2 | + | sbcl --non-interactive --load binary.lisp | |
added example-init.lisp mode 100644
| @@ -0,0 +1,12 @@ | |||
| 1 | + | ;;;; common lisp window manager | |
| 2 | + | ;;;; | |
| 3 | + | ;;;; example user init file | |
| 4 | + | ||
| 5 | + | (in-package #:clwm-user) | |
| 6 | + | ||
| 7 | + | (defclass my-wm (wm) ()) | |
| 8 | + | ||
| 9 | + | (run-wm 'my-wm) | |
| 10 | + | ||
| 11 | + | ;; if slynk is desired | |
| 12 | + | ;; (start-slynk) | |