Discoveries: stumpwm and screen-profiles
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:
- Well, stumpwm is written in what emacs would call an inferior brand of lisp… [↪]
- 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. [↪]
- And just like screen, now that screen-profiles exists, there’s a configurable mode line. [↪]
- 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. [↪]
-
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. [↪] -
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. [↪]
Comments
if you like ido give icicles a try, icicles is the gnus of completion, it's big, it's ugly, it's messy, it's probably hell to config at first but it's so powerful you'll be thankful for the time you spent (it also has a more emacs like behavior and an awesome fuzzy matcher)
Cheers, will check it out. (Big and messy ... well, we'll see.)
Its good to know that I'm not the only one who is finding StumpWM fantastic. I showed it to a few friends of mine and the only response I got when I said that I never have to use the mouse now (with Conkeror and emacs on my computer) was "To each their own".
Being able to avoid the rodent is fantastic, but it's the lisp configuration/extension that has me really sold. Well, that plus the everything-fullscreen model (great for my tiny netbook). Well, that plus the high-bandwidth graphical keyboard user interface.
Hell, I should admit it, it's everything about it.
(I expect to continue sounding like a rabid fanboy for at least another week, before the accumulated niggles and inconveniences make me realise that this is just another piece of software, not The Answer To My Prayers.)
Story added...
This story has been submitted to fsdaily.com! If you think this story should be read by the free software community, come vote it up and discuss it here:
http://www.fsdaily.com/HighEnd/Discoveries_stumpwm_and_screen_profiles...