in which a number of tools factor

«

»

Today's post is going to consist of a roundup of a bunch of small tools that may not deserve their own post but are still quite useful in their own way with a short bonus round at the end for a micro-project I cooked up yesterday. Perhaps I'll throw in a preview of another in-progress project if I don't forget by the time I'm done writing this post.

To start with: any self-respecting prog'er needs to bind keystrokes to execute commands. [1] The truly hardcore can simply bind keys within Emacs with the global-set-key function and leave it at that. The rest of us, however, must venture outside the warm embrace of Emacs from time to time and would understandably be irked to find our carefully-bound key strokes void of bindings. Are we then doomed to set up bindings in our window managers that will not outlast our committment to that WM? Are we not to know the peace of mind that comes with storing all such settings in text files under revision control?

The answer to the above questions will already be guessed by the astute reader as 'no'. The solution to the problem raised above is xbindkeys, a small yet indispensable utility for binding keystrokes to commands. As a small bonus it embeds the GNU Guile Scheme interpreter, so configuration may be written in that most blissful of formats, the S-expression.

Something else I use every day but don't interact with much directly is mpd, the Music Player Dæmon. Music players traditionally fall into either the multi-window playlist-management style popularized by Winamp and XMMS or the Soundjam-inspired full-library style. mpd takes a third approach: it deals only with the cataloging and playing of music, leaving the user-interface up to a number of third-party clients. This makes it trivial to remotely control your music without resorting to hacks like VNC or X-forwarding. There are your regular Ryhthmbox-style GTK GUIs to it, but Web frontends and the mpc command-line client are both quite easy to set up and use. It's also trivial to tie mpc into other tools as mentioned below.

Another small tool that I've recently come to appreciate is dmenu. I find this overlooked tool indispensible in another facet of the venerable art of providing Emacs' functionality outside Emacs—specifically ido-mode's autocompleting matcher. dmenu was originally written to work with the plan9-inspired wmii window manager popularized in the Ruby community by Mauricion Fernandez and _why the lucky stiff, but in true UNIX^H^H^H^Hplan9 fashion is totally usable on its own.

The basic idea is that you pipe it a list of many options and it narrows the list of options as you type, providing instant feedback. wmii uses it to great effect as a launcher, but I've found it most useful as a minimalist instant-feedback frontend to mpd. But the program launcher from wmii is easily ported.

Lastly, SCPaste is a tool that I envisioned as I was falling asleep earlier this week. I implemented it mostly on the bus the next day. The idea is to reimplement services such as lisppaste or rafb, but instead of creating its own interface for creating new posts and syntax-highlighting, it leverages existing solutions: scp and GNU Emacs' font-lock. It simply makes two assumptions: you have an SSH account on a publicly-accessible HTTP server, and you're going to paste things that Emacs already knows how to highlight. Given these entirely reasonable constraints, a paste service ends up being about sixty lines of code.

Oh, I almost forgot the sneak preview: behold RDoc Texinfo. Soon you will no longer have to deal with the silliness of Ruby having its own reimplementation of man and info but will be able to read your documentation from the comfort of your fast, hyperlinked Info reader. Stay tuned!


[1] - This does not hold for people (I'm told they exist) who use the mouse for absolutely everything. These people, however, may only rarely qualify as "self-respecting prog'ers".

« older | 2008-01-04T23:47:28Z | newer »