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 href=
"http://feeds.unknownlamer.org/rss/site-updates"
11 rel=
"alternate" type=
"application/rss+xml" title=
"Updates Feed" />
13 <link rel=
"stylesheet" href=
"default.css" />
16 <h1>Scheme Your Windows
</h1>
17 <div class=
"contents">
20 <a href=
"#sec1">Installing SCWM
</a>
25 <a href=
"#sec2">Dependencies
</a>
30 <a href=
"#sec3">Required
</a>
33 <a href=
"#sec4">Optional
</a>
38 <a href=
"#sec5">Downloading and Building
</a>
41 <a href=
"#sec6">Running
</a>
44 <a href=
"#sec7">Hacking
</a>
49 <a href=
"#sec8">XNested Setup
</a>
52 <a href=
"#sec9">GDS for Interaction
</a>
62 <!-- Page published by Emacs Muse begins here --><h2><a name=
"sec1" id=
"sec1"></a>
65 <h3><a name=
"sec2" id=
"sec2"></a>
68 <h4><a name=
"sec3" id=
"sec3"></a>
72 <li><a href=
"http://www.gnu.org/software/guile">Guile
</a> 1.8.0+
</li>
73 <li>IMLib
1.x (in Debian imlib11-dev)
</li>
77 <h4><a name=
"sec4" id=
"sec4"></a>
81 <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
87 <h3><a name=
"sec5" id=
"sec5"></a>
88 Downloading and Building
</h3>
90 <p class=
"first">A working version of SCWM can be obtained from
91 <a href=
"http://sourceforge.net/cvs/?group_id=225">sourceforge CVS
</a>. Compilation is much more straightforward than one
92 would suspect from a project so old (thanks to dsmith for doing the
93 painful parts of unbitrotting). The standard autoconf sequence of
94 commands should work.
</p>
104 <h3><a name=
"sec6" id=
"sec6"></a>
107 <p class=
"first">The directory
<code>sample.scwmrc
</code> has a few sample SCWM
108 configurations.
<code>system.scwmrc
</code> and
<code>sample.scwmrc
</code> both work fairly well;
109 I have yet to test the others. If not using
<code>system.scwmrc
</code> it is useful
110 to at least include the bits that enable debugging.
</p>
113 (
<span class=
"emacs-face-keyword">define
</span> <span class=
"emacs-face-function-name">debug
</span> #t)
115 (
<span class=
"emacs-face-keyword">if
</span> debug
116 (
<span class=
"emacs-face-keyword">begin
</span>
117 (add-hook! module-loaded-hook display-module-loaded)
118 (set! %load-verbosely #t)
119 (debug-enable 'debug 'backtrace)
120 (read-enable 'positions)))
123 <p>SCWM will attempt to load
<code>system.scwmrc
</code> by default, but this can be
124 overridden with the
<code>-f
</code> option. The default
<code>system.scwmrc
</code> loads user
125 config from a series of files in
<code>~/.scwm/
</code>.
</p>
128 <h3><a name=
"sec7" id=
"sec7"></a>
131 <h4><a name=
"sec8" id=
"sec8"></a>
134 <p class=
"first">The easiest way to hack on SCWM is to run it inside of Xnest.
</p>
136 <pre class=
"example">
138 scwm --display :
1 --debug # --debug makes X requests synchronous
142 <h4><a name=
"sec9" id=
"sec9"></a>
143 GDS for Interaction
</h4>
145 <p class=
"first">SCWM has an emacs interaction mode that communicates with the window
146 manager using X window properties, but the emacs side of the code
147 doesn't quite work, and GDS is featureful enough now to be used to
148 interact with scwm. Using GDS makes hacking scwm quite a bit
149 easier.
<strong>GDS requires a Guile built with threads to work properly
150 (the version in Debian is built
<em>without
</em> threading).
</strong></p>
154 <p>The following code should be in your scwmrc somewhere.
</p>
157 (use-modules (ice-
9 gds-client)
160 <span class=
"emacs-face-comment-delimiter">;;;
</span><span class=
"emacs-face-comment">GDS thread (in case it must be killed during debugging, ...)
161 </span>(
<span class=
"emacs-face-keyword">define
</span> <span class=
"emacs-face-function-name">cke-gds-thread
</span> #f)
163 (
<span class=
"emacs-face-keyword">define
</span> (
<span class=
"emacs-face-function-name">connect-to-debugging-server
</span>)
165 (call-with-new-thread (
<span class=
"emacs-face-keyword">lambda
</span> () (run-utility))))
169 <p>After defining you can either use
<code>scwmrepl
</code> to run
170 <code>(connect-to-debugging-server)
</code> after starting a GDS server, or simply
171 add
<code>(connect-to-debugging-server)
</code> to the config if one will always be
175 <h5>Emacs config
</h5>
177 <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
178 interaction with guile.
</p>
181 (
<span class=
"emacs-face-keyword">require
</span> '
<span class=
"emacs-face-constant">gds
</span>)
182 (
<span class=
"emacs-face-keyword">require
</span> '
<span class=
"emacs-face-constant">gds-server
</span>)
183 (
<span class=
"emacs-face-keyword">require
</span> '
<span class=
"emacs-face-constant">gds-scheme
</span>)
185 (
<span class=
"emacs-face-keyword">defvar
</span> <span class=
"emacs-face-variable-name">guile-scratch-buffer-name
</span> <span class=
"emacs-face-string">"*guile-scratch*"</span>
186 <span class=
"emacs-face-doc">"Name of the Guile evaluation scratch buffer"</span>)
188 (
<span class=
"emacs-face-keyword">defun
</span> <span class=
"emacs-face-function-name">make-guile-scratch-buffer
</span> ()
190 (
<span class=
"emacs-face-keyword">let
</span> ((scratch-buf (generate-new-buffer guile-scratch-buffer-name)))
191 (switch-to-buffer scratch-buf)
193 (gds-auto-associate-buffer)))
196 <p>If you were already running a debugging client process you will need
197 to choose the process to associate the buffer with;
<code>ps
</code> will tell you
201 <h5>Known Issues
</h5>
203 <p>Occasionally evaluating an expression or viewing a backtrace will make
204 scwm lockup. My understanding is that scwm is not threadsafe, and
205 there are some evil issues that will take a while to solve. GDS works
206 well enough for now; if I can't make GDS completely reliable I shall
207 unbitrot the scwm emacs interaction mode (unless someone else beats me
208 to it,
<em>hint hint
</em>).
</p>
214 <!-- Page published by Emacs Muse ends here -->
216 <p class=
"cke-buttons">
217 <!-- validating badges, any browser, etc -->
218 <a href=
"http://validator.w3.org/check/referer"><img
219 src=
"http://www.w3.org/Icons/valid-xhtml10"
220 alt=
"Valid XHTML 1.0!" /></a>
222 <a href=
"http://www.anybrowser.org/campaign/"><img
223 src=
"img/buttons/w3c_ab.png" alt=
"[ Viewable With Any Browser
226 <a href=
"http://www.debian.org/"><img
227 src=
"img/buttons/debian.png" alt=
"[ Powered by Debian ]" /></a>
229 <a href=
"http://hcoop.net/">
230 <img src=
"img/buttons/hcoop.png"
231 alt=
"[ Hosted by HCoop]" />
234 <a href=
"http://www.fsf.org/register_form?referrer=114">
235 <img src=
"img/buttons/fsf_member.png"
236 alt=
"[ FSF Associate Member ]" />
240 <p class=
"cke-footer">Corinne: this is why we should have designated bath buddies
241 Corinne: to get places you cant reach because youre slippery and in
242 case you get a lil tooo slippery and crack your head open
243 someone can call the coast guard and save you
245 <p class=
"cke-timestamp">Last Modified: