1 <?xml version=
"1.0" encoding=
"utf-8" ?>
2 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
3 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
4 <html xmlns=
"http://www.w3.org/1999/xhtml">
6 <title>Scheme Your Windows
</title>
7 <meta name=
"generator" content=
"muse.el" />
8 <meta http-equiv=
"Content-Type"
9 content=
"text/html; charset=utf-8" />
10 <link rel=
"stylesheet" href=
"default.css" media=
"screen" />
13 <h1>Scheme Your Windows
</h1>
14 <div class=
"contents">
17 <a href=
"#sec1">Installing SCWM
</a>
22 <a href=
"#sec2">Dependencies
</a>
27 <a href=
"#sec3">Required
</a>
30 <a href=
"#sec4">Optional
</a>
35 <a href=
"#sec5">Downloading and Building
</a>
38 <a href=
"#sec6">Running
</a>
41 <a href=
"#sec7">Hacking
</a>
46 <a href=
"#sec8">XNested Setup
</a>
49 <a href=
"#sec9">GDS for Interaction
</a>
59 <!-- Page published by Emacs Muse begins here --><h2><a name=
"sec1" id=
"sec1"></a>
62 <h3><a name=
"sec2" id=
"sec2"></a>
65 <h4><a name=
"sec3" id=
"sec3"></a>
69 <li><a href=
"http://www.gnu.org/software/guile">Guile
</a> 1.8.0+
</li>
70 <li>IMLib
1.x (in Debian imlib11-dev)
</li>
74 <h4><a name=
"sec4" id=
"sec4"></a>
78 <li><a href=
"ftp://ftp.gnu.org/gnu/guile-gtk/guile-gtk-0.60.tar.gz">Guile-GTK
</a> 0.60 for dialog support. Guile-GTK
2.x and scwm are not
84 <h3><a name=
"sec5" id=
"sec5"></a>
85 Downloading and Building
</h3>
87 <p class=
"first">A working version of SCWM can be obtained from
88 <a href=
"http://sourceforge.net/cvs/?group_id=225">sourceforge CVS
</a>. Compilation is much more straightforward than one
89 would suspect from a project so old (thanks to dsmith for doing the
90 painful parts of unbitrotting). The standard autoconf sequence of
91 commands should work.
</p>
101 <h3><a name=
"sec6" id=
"sec6"></a>
104 <p class=
"first">The directory
<code>sample.scwmrc
</code> has a few sample SCWM
105 configurations.
<code>system.scwmrc
</code> and
<code>sample.scwmrc
</code> both work fairly well;
106 I have yet to test the others. If not using
<code>system.scwmrc
</code> it is useful
107 to at least include the bits that enable debugging.
</p>
110 (
<span style=
"color: #00ffff;">define
</span> <span style=
"color: #87cefa;">debug
</span> #t)
112 (
<span style=
"color: #00ffff;">if
</span> debug
113 (
<span style=
"color: #00ffff;">begin
</span>
114 (add-hook! module-loaded-hook display-module-loaded)
115 (set! %load-verbosely #t)
116 (debug-enable 'debug 'backtrace)
117 (read-enable 'positions)))
120 <p>SCWM will attempt to load
<code>system.scwmrc
</code> by default, but this can be
121 overridden with the
<code>-f
</code> option. The default
<code>system.scwmrc
</code> loads user
122 config from a series of files in
<code>~/.scwm/
</code>.
</p>
125 <h3><a name=
"sec7" id=
"sec7"></a>
128 <h4><a name=
"sec8" id=
"sec8"></a>
131 <p class=
"first">The easiest way to hack on SCWM is to run it inside of Xnest.
</p>
133 <pre class=
"example">
135 scwm --display :
1 --debug # --debug makes X requests synchronous
139 <h4><a name=
"sec9" id=
"sec9"></a>
140 GDS for Interaction
</h4>
142 <p class=
"first">SCWM has an emacs interaction mode that communicates with the window
143 manager using X window properties, but the emacs side of the code
144 doesn't quite work, and GDS is featureful enough now to be used to
145 interact with scwm. Using GDS makes hacking scwm quite a bit
146 easier.
<strong>GDS requires a Guile built with threads to work properly
147 (the version in Debian is built
<em>without
</em> threading).
</strong></p>
151 <p>The following code should be in your scwmrc somewhere.
</p>
154 (use-modules (ice-
9 gds-client)
157 <span style=
"color: #ff7f24;">;;;
</span><span style=
"color: #ff7f24;">GDS thread (in case it must be killed during debugging, ...)
158 </span>(
<span style=
"color: #00ffff;">define
</span> <span style=
"color: #87cefa;">cke-gds-thread
</span> #f)
160 (
<span style=
"color: #00ffff;">define
</span> (
<span style=
"color: #87cefa;">connect-to-debugging-server
</span>)
162 (call-with-new-thread (
<span style=
"color: #00ffff;">lambda
</span> () (run-utility))))
166 <p>After defining you can either use
<code>scwmrepl
</code> to run
167 <code>(connect-to-debugging-server)
</code> after starting a GDS server, or simply
168 add
<code>(connect-to-debugging-server)
</code> to the config if one will always be
172 <h5>Emacs config
</h5>
174 <p>I wrote
<a href=
"http://darcs.unknownlamer.org/site-emacs/init.d/guile-debug.el">a bit of elisp
</a> to simplify setting up a scratch buffer for
175 interaction with guile.
</p>
178 (
<span style=
"color: #00ffff;">require
</span> '
<span style=
"color: #7fffd4;">gds
</span>)
179 (
<span style=
"color: #00ffff;">require
</span> '
<span style=
"color: #7fffd4;">gds-server
</span>)
180 (
<span style=
"color: #00ffff;">require
</span> '
<span style=
"color: #7fffd4;">gds-scheme
</span>)
182 (
<span style=
"color: #00ffff;">defvar
</span> <span style=
"color: #eedd82;">guile-scratch-buffer-name
</span> <span style=
"color: #b3b3b3;">"*guile-scratch*"</span>
183 <span style=
"color: #b3b3b3;">"Name of the Guile evaluation scratch buffer"</span>)
185 (
<span style=
"color: #00ffff;">defun
</span> <span style=
"color: #87cefa;">make-guile-scratch-buffer
</span> ()
187 (
<span style=
"color: #00ffff;">let
</span> ((scratch-buf (generate-new-buffer guile-scratch-buffer-name)))
188 (switch-to-buffer scratch-buf)
190 (gds-auto-associate-buffer)))
193 <p>If you were already running a debugging client process you will need
194 to choose the process to associate the buffer with;
<code>ps
</code> will tell you
198 <h5>Known Issues
</h5>
200 <p>Occasionally evaluating an expression or viewing a backtrace will make
201 scwm lockup. My understanding is that scwm is not threadsafe, and
202 there are some evil issues that will take a while to solve. GDS works
203 well enough for now; if I can't make GDS completely reliable I shall
204 unbitrot the scwm emacs interaction mode (unless someone else beats me
205 to it,
<em>hint hint
</em>).
</p>
211 <!-- Page published by Emacs Muse ends here -->
213 <p class=
"cke-buttons">
214 <!-- validating badges, any browser, etc -->
215 <a href=
"http://validator.w3.org/check/referer"><img
216 src=
"http://www.w3.org/Icons/valid-xhtml10"
217 alt=
"Valid XHTML 1.0!" /></a>
219 <a href=
"http://www.anybrowser.org/campaign/"><img
220 src=
"img/buttons/w3c_ab.png" alt=
"[ Viewable With Any Browser
223 <a href=
"http://www.debian.org/"><img
224 src=
"img/buttons/debian.png" alt=
"[ Powered by Debian ]" /></a>
226 <a href=
"http://hcoop.net/">
227 <img src=
"img/buttons/hcoop.png"
228 alt=
"[ Hosted by HCoop]" />
231 <a href=
"http://www.fsf.org/register_form?referrer=114">
232 <img src=
"img/buttons/fsf_member.png"
233 alt=
"[ FSF Associate Member ]" />
237 <p class=
"cke-footer">The body bags and little rags of children torn in two,
238 And the jellied brains of those who remain to put the finger right on you
239 As the madmen play on words and make us all dance to their song
240 To the tune of starving millions to make a better kind of gun.
242 <p class=
"cke-timestamp">Last Modified: