1 #title Scheme Your Windows
9 - [[http://www.gnu.org/software/guile][Guile]] 1.8.0+
10 - IMLib 1.x (in Debian imlib11-dev)
14 - [[ftp://ftp.gnu.org/gnu/guile-gtk/guile-gtk-0.60.tar.gz][Guile-GTK]] 0.60 for dialog support. Guile-GTK 2.x and scwm are not
17 ** Downloading and Building
19 A working version of SCWM can be obtained from
20 [[http://sourceforge.net/cvs/?group_id=225][sourceforge CVS]]. Compilation is much more straightforward than one
21 would suspect from a project so old (thanks to dsmith for doing the
22 painful parts of unbitrotting). The standard autoconf sequence of
34 The directory =sample.scwmrc= has a few sample SCWM
35 configurations. =system.scwmrc= and =sample.scwmrc= both work fairly well;
36 I have yet to test the others. If not using =system.scwmrc= it is useful
37 to at least include the bits that enable debugging.
44 (add-hook! module-loaded-hook display-module-loaded)
45 (set! %load-verbosely #t)
46 (debug-enable 'debug 'backtrace)
47 (read-enable 'positions)))
50 SCWM will attempt to load =system.scwmrc= by default, but this can be
51 overridden with the =-f= option. The default =system.scwmrc= loads user
52 config from a series of files in =~/.scwm/=.
58 The easiest way to hack on SCWM is to run it inside of Xnest.
62 scwm --display :1 --debug # --debug makes X requests synchronous
65 *** GDS for Interaction
67 SCWM has an emacs interaction mode that communicates with the window
68 manager using X window properties, but the emacs side of the code
69 doesn't quite work, and GDS is featureful enough now to be used to
70 interact with scwm. Using GDS makes hacking scwm quite a bit
71 easier. **GDS requires a Guile built with threads to work properly
72 (the version in Debian is built *without* threading).**
76 The following code should be in your scwmrc somewhere.
79 (use-modules (ice-9 gds-client)
82 ;;; GDS thread (in case it must be killed during debugging, ...)
83 (define cke-gds-thread #f)
85 (define (connect-to-debugging-server)
87 (call-with-new-thread (lambda () (run-utility))))
91 After defining you can either use =scwmrepl= to run
92 =(connect-to-debugging-server)= after starting a GDS server, or simply
93 add =(connect-to-debugging-server)= to the config if one will always be
98 I wrote [[http://darcs.unknownlamer.org/site-emacs/init.d/guile-debug.el][a bit of elisp]] to simplify setting up a scratch buffer for
99 interaction with guile.
101 <src lang="emacs-lisp">
103 (require 'gds-server)
104 (require 'gds-scheme)
106 (defvar guile-scratch-buffer-name "*guile-scratch*"
107 "Name of the Guile evaluation scratch buffer")
109 (defun make-guile-scratch-buffer ()
111 (let ((scratch-buf (generate-new-buffer guile-scratch-buffer-name)))
112 (switch-to-buffer scratch-buf)
114 (gds-auto-associate-buffer)))
117 If you were already running a debugging client process you will need
118 to choose the process to associate the buffer with; =ps= will tell you
123 Occasionally evaluating an expression or viewing a backtrace will make
124 scwm lockup. My understanding is that scwm is not threadsafe, and
125 there are some evil issues that will take a while to solve. GDS works
126 well enough for now; if I can't make GDS completely reliable I shall
127 unbitrot the scwm emacs interaction mode (unless someone else beats me