Hacker News new | past | comments | ask | show | jobs | submit login
StumpWM – Tiling Window Manager in Common Lisp (stumpwm.github.io)
119 points by giancarlostoro on April 18, 2016 | hide | past | favorite | 50 comments



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.


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.


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

- 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.


Also xmonad with haskell - http://xmonad.org/


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).


If you're on OS X there is always Amethyst [1], previous discussion [2]. I use it everyday.

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


The maintainer of Amethyst is an awesome person too. Amethyst is honestly the single thing that makes OS X tolerable for me.

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.


Slightly different game, but you can also interact with i3, a very mature WM, using Chicken Scheme: http://wiki.call-cc.org/eggref/4/i3


Another one, awesomewm - uses Lua - https://awesome.naquadah.org


Oh, I miss ion3 on osx.


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...

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


I'm playing with http://herbstluftwm.org/ - it's written in C++, has an IPC command line client written in C. The configuration file is a bash script that uses the IPC client, but you can also use a script/program in your favorite language instead.


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


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.


i3 repositioning - meta + arrows

i3 resizing - meta + r and arrows

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


Regarding configuration yes, regarding hacking it and community-wise, still nice for someone who likes C a lot.

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.


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.


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.


I've had another WM that doesn't hijack your entire screen but I forgot which, it might of been xmonad though.


If 30MB is the application size: If you reduce recording of source code info, then it should be quite a bit smaller.


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


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.


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


Yes, an i3 inspired one: https://github.com/SirCmpwn/sway


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.


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.


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


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.


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.


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

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...


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


Like I've written in a comment here, very often programming language preference decides about what wm is best for someone.

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.


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.


>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.


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.


If you want a tiled window manager and don't need to touch any programming language use i3


Lua ... AwesomeWM right?


Thanks, corrected it.


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.


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


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/

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


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)


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).


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


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


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)."


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


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


under the screen-shot link maybe? https://stumpwm.github.io/screenshots.html


There isn't much to see with a tiling window manager...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: