StumpWM – Tiling Window Manager in Common Lisp
stumpwm.github.io
stumpwm.github.io
When I use StumpWM, I feel like I'm using the interface of 2084, not 1984.
I like that out of the box it's light weight and fast, and I keep mine that way.
The keyboard shortcuts are pretty easy to pick up, but I think being used to Emacs' C-x-... convention helps here because StumpWM works basically the same way but uses C-t-... instead. I personally use tmux (C-b-...), Emacs (C-x-...), and StumpWM (C-t-...) and occasionally use the wrong control sequence in the wrong window, but you get used to it after a while.
I like having the config files in Lisp, and it's nice to connect to StumpWM's REPL to execute configuration changes and have them take effect immediately. Other than that, I like the idea of being able to script it using Common Lisp, but TBH I have not taken advantage of that ability to any appreciable extent.
I've had a few annoyances due to (what I suspect) are general tiling WM issues. Popup and modal windows can be more annoying than usual, as can windows that expect to be exactly a certain size or layout. I think those issues can be worked around using various options and customization, but it hasn't bothered me enough to look into it.
Overall I've been very happy with it and recommend it to anybody who wants a lightweight, alternative WM.
- wmii - via the 9fs interface - https://wiki.archlinux.org/index.php/wmii
- ion3 / notion - via lua bindings - http://notion.sourceforge.net/
- guile-wm - similar goals as stumpwm, with scheme - https://github.com/mwitmer/guile-wm
Of all of these notion is the most "out of the box" complete WM, whereas guile-wm is the most immature.
On a tangent: For automation and window management (via Lua), check out the awesome Hammerspoon [3].
[1] http://ianyh.com/amethyst/ [2] https://news.ycombinator.com/item?id=8768022 [3] http://www.hammerspoon.org
That said, it's nowhere near as good as a real tiling WM. There are still the technical limitations of the OS X system to fight.
So the question is not necessarily why choose CL for a window manager, the question is: why not?!
In quite a lot of cases Programming Language preference decides what WM people end up with, and that's totally fair.
If you are into C/Lua, Awesome might be your thing.
If you are into C, try dwm and i3.
If you are into haskell, then by all means, xmonad might be great for you.
If you are into Python, there is Qtile for that (also quite nice).
For a list see here https://en.wikipedia.org/wiki/Comparison_of_X_window_manager...
At one point I also tried StumpWM out of interest, and though this was a while ago, it was perfectly usable.
There's a scale of how manage-y window managers are. Oldschool floating WMs are very manual in that you have to position and size each window on your own. i3 improves a lot on that by offering some automation, as long as the user still provides the basic idea of where to split and so on. Other WMs like xmonad, dwm et al. automatically position and size windows according to pre-defined layouts, which can be tweaked dynamically.
i3 resizing - meta + r and arrows
i3 floating - meta + shift + space move meta + left mouse button
An additional criterion actually is license (somewhat). I for one am put off by anything published under GPLv3, think it's nice i3 is released under the BSD-License. Definitely something I personally regard as positive.
If you know lisp then you can use stump to emulate i3 or dwm down to every last detail in about 25 minutes.
Pretty light running on Clozure-CL. 30 MB. I rotate between stump and dwm quite a bit.
It would take me hours if not days to work out all the details.
For me, a big quality of life win with tiling wms is to set the default screen split to 2/3-1/3 instead of 50-50.
The neat thing about Sawfish was that its design was very similar to that of Emacs -- an application-specific lisp interpreter with domain-specific C primitives, coupled with higher-level implementation in lisp. Sawfish lisp was also very similar to Emacs lisp.
My setup looks like this currently:
https://klibert.pl/statics/images/stumpwm.png
and here is my mode-line config:
https://klibert.pl/posts/stumpwm-better-modeline.html
Anyway, StumpWM is great, but not because it's a tiling WM. It's absolutely fantastic because it's a live environment: you can attach a Lisp shell to your running stumpwm instance and immediately get a full-blown programming and debugging environment. See here: http://malisper.me/2015/07/07/debugging-lisp-part-1-recompil... (and subsequent posts in the series) for a good introduction to what it really means to work inside a live environment.
The problem with this is that it's very, very hard (if not impossible) to show the dynamic, live environment with still images/screenshots. I think it would be good to record a screencast showing a bit of programming and debugging in StumpWM. I wanted to do this a few times in the past, but by the time I remembered I should start recording I already fixed whatever I wanted to fix...
I don't use dwm, but it sure is neat to have your config rolled into the executable itself.
So if you are into CL, then StumpWM is a nice thing to configure, hack, nicely integrated with a Lisp Interpreter, no interference with Emacs Shortcuts (default StumpWM shortcuts keep out of the way), you will feel at home in the community, et cetera...
I've tried lots of different tiling window managers, and most of them can be configured to behave quite similarly / to have a very similar workflow. So the reasons for choosing one over the other are sometimes very subtle.
Being in Common Lisp, StumpWM is portable, "designed to run on many lisp systems" (quote straight from documentation).
Its language, rep, apparently started out as being closer to Common Lisp, but gradually changed to be pretty close to Scheme. (...which I liked, as I prefer lisp-1s) I eventually switch to i3, partly because I wanted an actual tiling wm, and partly because sawfish was starting to become pretty outdated (no Unicode or anti-aliased fonts, if I remember right).
I do wish i3 used a real programming language rather than the somewhat adh hoc configuration language it uses, but for the most part it does what I want. (The one thing I really want is a way to add a hook for when the last window on a workspace is closed that would switch to the last workspace that was opened on that head that still has open windows. Being able to dynamically sign workspace numbers to named workspaces would also be nice. Some of these things may be possible with external scripts and i3-msg)