Apparently my family don’t understand anything I write on this blog any more. This post isn’t going to help. The good news is, I’ve got a bundle of photos from Stockholm which I hope to put up sometime over the weekend. Travels in Scandinavia, that’s not geeky at all, right?

This, on the other hand, is.

I’ve used GNU screen for ages to keep my working environment set up the way I like it, wherever I am. I have a screen session permanently running on my office linux box, which I ssh to from wherever I happen to be.

That all changed this week, when my branch of our research institute moved to a new building. My linux box was taken offline and loaded into a truck; when it arrived at its new home, due to various cock-ups among the administration, it had no network access. (Word is they’re not going to let us ssh in anyway, sigh.)

So I’ve been playing around trying to set up my eee pc as a useful working environment. Step 1 was just copying all my configs from the desktop over to the netbook, and running everything from there instead. Imagine my surprise when some applications did not work the same way as they used to!

Specifically, screen has gained a purely awesome addition: screen-profiles provides something like the mode bar in emacs, configurable to add all sorts of goodies (battery monitor, wifi strength, lots of bits and pieces).

My other new discovery, which rather overshadows the first, is StumpWM. If screen and emacs had a baby, and brought it up to be a window manager, that would be stumpwm.

It’s a window manager written in lisp, like emacs,1 and like emacs it’s configurable on-the-fly by lisp hacking.2 Also like emacs it’s highly keyboard-driven, but more along the lines of screen: there’s a prefix key that diverts input to the stumpwm keymaps. (Actually I never realised before how similar the emacs and screen models are here; the only real difference is that screen gets away with only one keymap, hence only one prefix command. Stumpwm lets you define more if you need to, naturally.) Like screen, and unlike most window managers, you only see whatever you’re using at the moment (although you can tile windows the same way you can split emacs frames).3

I started messing around with stumpwm because the display of the eee is so tiny, and I was frustrated with the amount of space being wasted on menu bars and panels and whatever.4 I didn’t get very far at first, because I was trying to do everything by hand: shut down the Gnome display manager and restart X, pointing it at stumpwm. Of course all sorts of things stopped working, most importantly audio. But then I followed XSteve’s instructions for adding stumpwm as a session type under ubuntu, and magically everything worked.5

By “everything”, I mean everything. Audio works (I’m listening to Bettye Lavette in Amarok right now). Two-finger touch-pad scrolling works. I can split a stumpwm screen into two panes, pull firefox into one pane and emacs into the other, mouse-select text in firefox and drag and drop it into emacs. It not only works, it shows the text being dragged (otherwise I never would have tried the experiment). Global shortcut keys defined in Gnome work (so I can control the volume Amarok plays at).

I am a complete convert: stumpwm is fantastic.

I have two complaints.

The first is that I want better ways to switch windows: a list across all groups, that works like ido in emacs: filter the list of possible targets by any sort of match, rather than just prefix-matching and tab-completion.6

My second complaint is that both stumpwm and ido are written in (dialects of) lisp. Meaning that it’s conceivable that someone could hack bits of one into the other. Meaning that I’m awfully tempted to give it a try, instead of working on my dissertation. Shame on you, developers, for not protecting me from my instincts.

Notes:

  1. Well, stumpwm is written in what emacs would call an inferior brand of lisp… []
  2. Yes, you can change the source code of your window manager while it’s running. And yes, once you can do this you’ll discover all sorts of reasons why you might want to. []
  3. And just like screen, now that screen-profiles exists, there’s a configurable mode line. []
  4. Emacs with no scrollbars and the font set to 8pt fits 80 characters twice, in a two-column split, which is magical for LaTeX. Viewing the pdf in Okular is less pleasant. []
  5. XSteve is the author of the psvn package (which adds excellent subversion support to emacs), among many other software projects. His config tips are worth checking out too. []
  6. Ido (‘interactively do things’) is another recent discovery; I’m completely sold on buffer-switching, and the fact that it lets me prefer .tex over .aux when opening files might be enough of a draw card to force me to get used to the way it treats backspace and tab. []