This is the stumpwm FAQ. If you have a FAQ but don't have the answer, put it up anyway and hopefully someone will answer it.
If you intend to use sbcl you need to install portable-clx. If you're using clisp, make sure it has been compiled with mit-clx. As of clisp 2.42, new-clx should be good enough to run stumpwm.
Building stumpwm from CVS requires that you build the configure script:
$ autoconf
If there's already a configure script then just run it.
$ ./configure
By default stumpwm elects sbcl. You can explicitely use clisp this way:
$ ./configure --with-lisp=clisp
If your lisps are in strange places you may need to tell the script where to find them:
$ ./configure --with-sbcl=/home/sabetts/opt/bin/sbcl --with-clisp=/usr/local/downstairs/to/the/left/clisp
Now build it:
$ make
If all goes well, you should have a stumpwm binary now. Sorry there's no install yet. Just copy the binary wherever you want or run it out of the stumpwm/ directory.
L1 means F11, L2 means F12, etc. This should change in git relatively(?) soon (time of writing: May 2008).
Changing the prefix key is done with set-prefix-key.
If you would like to change it to the very nice C-z try (set-prefix-key (kbd "C-z"))
You can also change it interactively with the escape command: C-t ; escape C-z
The short answer is that you don't. In stead, you use xmodmap to map the keycode to an unused key (for example F20). See next question for an example.
As far as I (LqR?) know, the left windows key has #115 and the right one is 117. If it doesn't work for you, you might want to run xev to find the number of your windows key.
First, you need to map your windows key to a X key, for example F20. Do xmodmap -e "keycode 115 = F20". If you are going to use this setup permanently, you might want to add this mapping statically by adding a line with the above mentioned command in your .xinitrc (before stumpwm!), or by adding "xmodmap $HOME/.xmodmaprc" (without quotes, also before stumpwm) to your .xinitrc and adding "keycode 115 = F20" (without quotes) and any other xmodmap commands you wish to your .xmodmaprc
Then, set stumpwm to use the "F20" key (==your left windows key) by adding (set-prefix-key (kbd "F20")) to your .stumpwmrc. Also, remember to do (in-package :stumpwm) in your rc file, or else stumpwm won't find the function kbd!
(from #stumpwm on freenode)
You can remap it to be another ctrl key in a manner similar to the above. Add
remove lock = Caps_Lock add control = Caps_Lock
to your ~/.xmodmaprc
xmodmap(1) generally provides other interesting examples as well.
Yes, the texinfo manual comes with stumpwm and is called stumpwm.texi. to build an info file out of it run:
$ makeinfo stumpwm.texi
Right now it runs on SBCL and CLISP It probably runs on others, but they haven't been tested.
Some differences of stumpwm on SBCL and CLISP are:
So both SBCL and CLISP need hacks! See Compiling SBCL and Compiling CLISP.
Some windows provide a resize increment hint that asks the window manager to ensure it's size is always a multiple of these hints. For instance, Xterms have a resize increment hint based on the size of the font they use. This way they resize by columns and rows.
That's the default pointer icon for X windows. To change it to an arrow:
$ xsetroot -cursor_name left_ptr
Or put this in your rc file:
(stumpwm:run-shell-command "xsetroot -cursor_name left_ptr")
When you build an image using sbcl, it's about 32M. For window managers that's pretty big. The reason is because all of sbcl is dumped with stumpwm. Remember, stumpwm runs on a full common lisp distribution which depending on who you ask is jam packed with features and functionality or bloated. Dumping an image, as stumpwm does, is the equivalent of statically linking all the dependency libraries in a C program.
However, sbcl is not your only choice. clisp works well and is significantly smaller.
Either do "C-t ; pull RET" and it will prompt you for a window number, or bind just "pull" to a key and it will prompt you for a window number.
Although this does not fix the problem, this workaround in ~/.stumpwmrc works:
(defparameter *shift-map* (make-sparse-keymap)) (define-key *root-map* (kbd "ISO_Level3_Shift") '*shift-map*) ;; To map the help on C-t AltGr-q: (define-key *shift-map* (kbd "q") "help")
It would seem that SBCL threading in combination with StumpWM causes this. Either switch to clisp or rebuild SBCL without thread support.
mit-clx, used with clisp, doesn't support timeouts. Use new-clx instead. Alternatively, the problem can be worked around by periodically sending meaningless X events, thereby breaking mit-clx's blocking read and returning control to StumpWM (to do things like unmap those message windows.)
Put the following in your ~/.xinitrc file, before the call to stumpwm:
(while sleep 1; do xprop -root -f FOO 8s -set FOO foo; done )&
This will give StumpWM timers a one-second resolution, which is sufficient for clearing message windows and updating the mode-line.
StumpWM has a mailing list and an IRC channel: #freenode on irc.freenode.net. Both are pretty helpful.
You need cl-ppcre to build stumpwm. The stumpwm releases come with a copy but if you're running stumpwm from git, you need to grab yourself one. Here are the steps:
$ ./configure --with-lisp=clisp --with-clisp=~/bin/clisp --with-ppcre=~/contrib/cl-ppcre-1.3.0 && make
Note that praying is no longer required.
Yes, using StumpWM from the Git repository. KDE's kicker and Gnome's gnome-panel work fine, as should any other panel application that remembers to set its dock type *before* calling XMapWindow?.
I am using SBCL, and I have previously been able to build StumpWM just fine from GIT, only now I can't anymore, because make throws me "Error during processing of --eval option (LOAD #P"./make-image.lisp"):
component CLX-SYSTEM::SB-BSD-SOCKETS not found, required by
#<SYSTEM "clx" {10025F7061}>".I have both cl-clx-0.7.3 and cl-ppcre-1.2.16.
I mentioned this question in #stumpwm, it seems someone has had this error about a year ago, the cause being a broken SBCL from FreeBSD? ports. And I'm not sure but "CLX-SYSTEM::SB-BSD-SOCKETS" seems weird to me (it may not be). Also, there's a mailing list you may wish to ask this question on if you still have a problem here: http://lists.nongnu.org/mailman/listinfo/stumpwm-devel
C-t k
Add the following code to your .stumpwmrc file:
;; Code by Male
;; Display the keysequence in progress
(defun key-press-hook (key key-seq cmd)
(declare (ignore key))
(unless (eq *top-map* *resize-map*)
(let ((*message-window-gravity* :bottom-right))
(message "Key sequence: ~A" (print-key-seq (reverse key-seq))))
(when (stringp cmd)
;; Give 'em time to read it.
(sleep 0.5))))
(defmacro replace-hook (hook fn)
`(remove-hook ,hook ,fn)
`(add-hook ,hook ,fn))
(replace-hook *key-press-hook* 'key-press-hook)