
StumpWM – Tiling Window Manager in Common Lisp - giancarlostoro
https://stumpwm.github.io/index.html
======
wtbob
I absolutely love StumpWM, and _never_ want to go back to a non-tiling, non-
Lisp window manager. I love that I can connect to it from emacs using SLIME
and recompile pieces while it's running. I love that it uses my entire screen,
cleanly. I love that it supports modern fonts. I love that it's fast &
visually lightweight. I love that it gets out of my way and lets me work.

When I use StumpWM, I feel like I'm using the interface of 2084, not 1984.

------
jlarocco
I use StumpWM on all of my Linux machines and love it, but my opinion may be
skewed because I switched to StumpWM after already using Emacs for a long time
(over 10 years), and while starting to use Common Lisp for more and more of my
personal projects. Before StumpWM I used FluxBox for a very long time.

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.

------
codemac
Similar programatic abilities can be found in the following window managers:

\- wmii - via the 9fs interface -
[https://wiki.archlinux.org/index.php/wmii](https://wiki.archlinux.org/index.php/wmii)

\- ion3 / notion - via lua bindings -
[http://notion.sourceforge.net/](http://notion.sourceforge.net/)

\- guile-wm - similar goals as stumpwm, with scheme -
[https://github.com/mwitmer/guile-wm](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.

~~~
sousousou
Also xmonad with haskell - [http://xmonad.org/](http://xmonad.org/)

~~~
gwern
Xmonad is a bit historically related to StumpWM, actually; a number of early
users had been using StumpWM for the greater programmability over Ratpoison,
but weren't all that keen on Common Lisp, so when dons decided to write a WM
in Haskell... I was one of them, and even ported over some of the more popular
extensions like search engine plugins (which were themselves originally
modeled on 'surfraw', a package of shell scripts written mostly by a fellow
named Julian Assange; everything is connected).

------
cisstrd
Window Managers are nice to play around with, I see no real reason for using
StumpWM other than that you also would use a Lisp Interpreter routinely and
program in Lisp. 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...

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...](https://en.wikipedia.org/wiki/Comparison_of_X_window_managers)

At one point I also tried StumpWM out of interest, and though this was a while
ago, it was perfectly usable.

~~~
baldfat
i3 = If your into text based setting with no programming for setup and sane
defaults.

~~~
kqr
If by "sane" you mean "tedious and manual", sure... ;)

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.

~~~
baldfat
i3 repositioning - meta + arrows

i3 resizing - meta + r and arrows

i3 floating - meta + shift + space move meta + left mouse button

------
maybeok
Love stump. It's the only WM I found that gives first-class support to full
screen. You are never "locked-in" when you go full screen as you are with i3.
Even dwm locks you in with fullscreen video games.

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.

~~~
aerique
What's your hourly rate? Could you please do that in 25 minutes for me? I'll
pay for that.

It would take me hours if not days to work out all the details.

------
sctb
StumpWM has a predecessor of sorts, written by the same author: Ratpoison
[http://www.nongnu.org/ratpoison/](http://www.nongnu.org/ratpoison/). It's
also tiling, but not extensible, and written in C instead of Common Lisp.

------
j1f4
I'm using it too. I've bound my most used Stump keys to windows-key combos so
that I don't have to use the prefix key very often. E.g. windows-e to focus
Emacs.

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.

------
joaomsa
On the topic of tiling WMs, any promising Wayland compatible ones?

~~~
pyotrgalois
Yes, an i3 inspired one:
[https://github.com/SirCmpwn/sway](https://github.com/SirCmpwn/sway)

------
pjmlp
Once upon a time GNOME had Sawfish as their default WM, but it failed to gain
traction and was later replaced by a pure C one.

~~~
NoGravitas
It's not so much that it failed to gain traction. It was the default window
manager through most of the Gnome 1 era. I used to write plugins and themes
for it. What happened was that it was very slow to transition to GTK2, and so
was not a great fit for Gnome 2. At the same time, the Gnome core devs were
pushing for more simplicity in the user interface and the development stack,
so pushed for Metacity, the less configurable C-based window manager you
mention.

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.

------
JBReefer
Why would you write a blurb for a window manager, without screenshots? That's
literally all it does!

~~~
kqr
Screenshots for a Window manager is pretty useless. I mean, it's just
application windows. A window manager itself is not graphically visible. The
only way you see it is in how it positions windows based on your commands.

~~~
JBReefer
I dig it, but a tiling WM is a fundamentally different paradigm than the
standard WMs. I haven't used one, so I had to look up screenshots. If you're
writing ad copy - which this fundamentally is - you need to consider these
things.

~~~
klibertp
Pretty much the only GUI that's StumpWM and not an application is a mode-line,
notifications and help.

My setup looks like this currently:

[https://klibert.pl/statics/images/stumpwm.png](https://klibert.pl/statics/images/stumpwm.png)

and here is my mode-line config:

[https://klibert.pl/posts/stumpwm-better-
modeline.html](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...](http://malisper.me/2015/07/07/debugging-lisp-
part-1-recompilation/) (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...

------
daurnimator
Anyone want to explain what might be better about stumpwm than awesomewm?

~~~
eudox
Personally, I don't really use StumpWM _itself_ , I just use a window manager
written in the programming language I know best -- and that just happens to be
StumpWM. If my favourite language was Lua, I'd use AwesomeWM. If I could
tolerate C for such a high-level application, I'd use dwm.

~~~
serf
>If I could tolerate C for such a high-level application, I'd use dwm.

I don't use dwm, but it sure is neat to have your config rolled into the
executable itself.

~~~
eudox
You can easily do this with StumpWM, and the process is the same: you write a
config file, add it to the stumpwm.asd file, and compile every time you need
to make a change.

------
duncan_bayne
I've been a very happy StumpWM user for years. Switching back to any other
windowing system - Cinnamon, OSX, Windows - is like working with one hand tied
behind my back.

------
jadbox
Hmm.. not sure if anything can get me to switch from i3, but this looks neat,
as being created solely on lisp.

~~~
kazinator
The Sawfish manager is another one in Lisp, but not Common Lisp. Rather, a
dialect called rep, which is packaged as a lshared library ("librep"):
[http://sawfish.tuxfamily.org/](http://sawfish.tuxfamily.org/)

Being in Common Lisp, StumpWM is portable, "designed to run on many lisp
systems" (quote straight from documentation).

~~~
xenomachina
I used sawfish (originally sawmill) for more than a decade. It was great for
customizability, and I had actually made key bindings for it do I could easily
tile my windows (at the time tiling wms weren't very common).

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)

------
gkya
See also: EXWM, an emacs window manager. Idk if it's mature yet, but I'm
keeping an eye on it, and may ditch twm for it if it becomes stable enough (my
emacs process is valuable to me, I don't want to ever kill it forcefully).

------
mapcars
[https://gitlab.common-lisp.net/clfswm/clfswm](https://gitlab.common-
lisp.net/clfswm/clfswm) is based on StumpWM and has its own unique features
too.

~~~
PuercoPop
CLFSWM is neat as well and certainly has its own unique features, but afaik it
is not based on StumpWM

~~~
e12e
FYI from the clfswm readme: "CLFSWM is a 100% Common Lisp X11 window manager
(based on [1]Tinywm and [2]Stumpwm. Many thanks to them)."

~~~
PuercoPop
I had forgotten about that. But from what I remeber from reading the code
other than the keymaps, there is not much similarity between the codebases

------
kentosi
I'm stumped at how I couldn't find a single screenshot.

~~~
CaptSpify
under the screen-shot link maybe?
[https://stumpwm.github.io/screenshots.html](https://stumpwm.github.io/screenshots.html)

