24 February 2009

The Backgrounds Strike Back

Just a little follow-up to the previous post. One feature I had in Sawfish that I hadn't yet got in StumpWM was a function to periodically change the wallpaper. You might say, hang on, if you're running applications fullscreen, what do you need a wallpaper for? Well, there are those brief moments when there are no apps open in a workspace. But more importantly, I use the terminal a lot (if nothing else, I always have IRC running over an SSH connection), and I generally use a terminal application with a transparency feature, showing my wallpaper in the background (tinted darker, of course, so that text is legible). A man can't live entirely without eye candy, after all. (rxvt-unicode is the current terminal of choice.)

For Sawfish I found a ready script on the website to change backgrounds. No such luck for StumpWM, so I decided to take a look at how hard it would be to implement it myself. It turned out to be very easy, just a few lines of Lisp code, although, again, I had to spend some time brushing up on my Lisp skills. A combination of Common Lisps features and functions built into StumpWM made it actually much simpler that the script for Sawfish, in the Librep dialect of Lisp.

There's a certain satisfaction you get from successfully) coding your own solutions that you can never get from installing ready apps or using graphical tools to configure your system. It's hard to describe in words.

With this hack I'm pretty much set up for regular, everyday use, with some very convenient shortcuts for switching between my favourite apps. Some more configuration might be needed to get the most out of multi-window applications like Gimp, but that can wait until the time I need such applications.

23 February 2009

From Simplifying to Downright Esoteric

Ok, I'd just learned the ropes of Sawfish when I decided to take StumpWM out for a spin. I'm pretty impressed, so far.

StumpWM is a minimalist, tiling window manager with a powerful keyboard interface. It has no window decorations and no mouse control. But what sets it apart from most other window managers is the fact that it's written entirely in Common Lisp. This means almost infinite customisation and scripting possibilities, and, best of all, interactive scripting while the window manager is running! (And yes, this was the main attraction in Sawfish as well, but StumpWM takes it up a notch.)

The Emacs-influenced keyboard interface is indeed powerful, but a little cumbersome for my taste, relying on combinations of several keystrokes. So the first order of business was to set up a few global shortcuts to switch between windows and run my favourite apps. This in itself was almost a trivial matter, but I had a little trouble getting the apple key on my MacBook to function (it's the best key for custom shortcuts as it's not used by any GNU/Linux application by default). After some labour I discovered that using xmodmap to designate it as a hyper key instead of a super key, and binding shortcuts to the hyper key, they suddenly worked.

In Sawfish I spent some time working on a little script in it's Lisp variety to display the track Rhythmbox was currently playing. While it wasn't a difficult task (most of the time was spent on learning things about the language as I'm still not too experienced with Lisp in general, and the particular dialect was entirely new to me), in StumpWM creating a similar feature was almost a trivial matter. As of now, I've pretty much got the same general functionality in StumpWM as I had in Sawfish, but there's still a lot I haven't really delved into, like more powerful use of frames (used for window placement) and groups (aka virtual desktops).

I've used tiling window managers (like wmii) with GNU/Linux before I got my MacBook, so the concept's not new to me. It might take a moment to re-adjust to the paradigm, but on the other hand even on Mac OS X I already mostly kept switching between windows and Spaces with the keyboard. For most of my regular needs (surfing the web, IRC, playing music, writing with Emacs), StumpWM works perfectly. These applications actually work best when they're fullscreen, no unnecessary decorations, title bars or window manager panels to swallow up valuable screen space (particularly as the MacBook's screen isn't incredibly big). I'll have to see what happens when I need to use an app with a very different kind of orientation, like GIMP.

20 February 2009

Still with the Simplifying

Continuing with the theme of the previous post, I decided that Amarok 2 was simply too buggy for use, and I wasn't sure if the interface was really the best possible in the first place, so I ditched it.

Right now I'm trying out Rhythmbox, a music player for Gnome. First impression: the GUI is rather simple, no eye candy, clear iTunes influence, no features out of the ordinary, but... it simply works. Right from the start.

OK, so it doesn't look very fancy. Well, it's a Gnome app, so selecting a decent looking GTK theme will instantly make it a lot more elegant. Like Amarok, it doesn't appear to support the Album Artist tag I used in iTunes to group multi-artist albums. But it's search feature works better than Amarok's, so I can just type, say, 'csi' and instantly find the CSI soundtrack album and play the tracks in correct order.

Artwork's always a problem, as pretty much every player I've tried seems to handle it differently. Rhythmbox doesn't support embedded artwork, but it should support covers saved in the album folders, which might, in fact, be the best solution. It also has an automatic artwork fetching feature, which downloads covers for each new album I play. Only the cover for the currently playing album is shown, in a little box in the corner, so this'll do fine for the time being, no hurry to instantly get artwork for all of my hundreds of albums. Of course this isn't as fancy as, say, iTunes's Cover Flow, but of course it also eats up less resources, only having to show one little pic at a time. In the long run, if I stick with this app, I'll probably download better quality images to save in the album folders, but there's no hurry.

Rhythmbox also has a pretty good command line remote control interface, which can be used for scripting. I've already set up a global hotkey to pause/resume playback. The only little downside I've noticed so far is that, while it has built in Last.fm scrobbling support, it doesn't apparently support the 'listening now' feature. The only reason this matters to me is that I was using a 'now playing' script for the irc client Irssi which used this.

Going Home Stage 2

Continuing the story of my transition to Debian.

KDE4, with its eye candy and many features mimicked almost directly from Mac OS X, softened the transition. But after a while I begun to feel how cumbersome and, frankly, buggy, it really was, and remembered that, hey, this is GNU/Linux we're talking about, with an endless selection of different window managers.

So, just for fun, I decided to look at possible alternatives. One light-weight window manager in particular caught my eye: Sawfish. Apart from generally being completely different from KDE, what really caught my attention was the introduction: "Sawfish is an extensible window manager using a Lisp-based scripting language..." Being something of an Emacs enthusiast (a very powerful editor also extensible in a Lisp-based language) and a Lisp fan in general, this looked like a solution with real potential.

So I installed it, and have now spent a day fiddling with it, and I think I'm hooked. There's less eye candy, but that only means that it feels much lighter and everything works faster. Sawfish, at its core, is a very bare bones window manager, the very opposite of what KDE stands for. But the scripting facilities provide endless possibilities. I've set up some very handy keyboard shortcuts, for instance, which launch applications I use often or switch to them if they're already running. Adding a few scripts from the website gave me some features I've gotten used to, like periodically changing wallpapers.

For the first time in a good while I feel I'm in control of the graphical environment and not the other way round. And hacking extensions with Emacs is lots more fun than than any GUI configuration tool will ever be.

15 February 2009

Astrology and Debian

I set up my astrology software for the new Debian installation today. The environment is pretty much the same I had on Mac OS X, based around Matt Skala's astrology LaTeX style, horoscop. But setting up a working TeX installation, complete with custom fonts, is rarely straightforward.

I went with a full TeX Live installation. It's a hefty download, and contains a lot of useless junk, but I didn't want any problems from missing packages. Installing the font for astrological symbols took some trial and error. Finding the right filetree for the files, the right configuration files to edit etc. took some work. But I succeeded in the end and now have LaTeX running without problems, complete with astrological symbols and the horoscop style for drawing good looking charts.

Last, I needed a backend to do the calculations. On OS X I used Astrolog, so I compiled and installed it, without problems. However, I discovered that when I enable ephemeris files provided for greater accuracy, I get some really weird planet positions, at least for Jupiter and Saturn. Without them it works perfectly, and also has the X interface that wouldn't work on OS X. The loss in accuracy should be insignificant for most ordinary needs.

However, on GNU/Linux I've got another option: Swiss Ephemeris from Astrodienst. I coudn't compile it on OS X, but had no trouble now (although I had to fiddle about with the sources a little to set the correct path for ephemeris files). This software has several pros and cons when compared to Astrolog.

On the plus side: It's much newer than Astrolog. It should be very accurate, though, as I said, in ordinary usage this is not a huge factor. It's able to calculate countless asteroids not supported by Astrolog. (Though as of now I'm still using only the seven classical planets.) It's GPL licensed. (Astrolog is basically free, but the terms forbid any kind of commercial use. Which naturally doesn't matter much to me right now, but I can't rule out the possibility of doing interpretation for money some day, even if only on a very small, semi-hobby basis).

The only real downside is that there is no feature rich interface like Astrolog has. It's really intended as a library for developing your own astrology software, but the included demonstration app is good enough to provide data for horoscop. Of course right now a basic, simple birth chart is what I'm mostly looking for, so I guess I'll go with Swiss Ephemeris for now, for accuracy and peace of mind over license questions.

12 February 2009

Settling In with Music

Carrying on from my last post: the first days living with my new Debian installation. One of the major apps I need is obviously the music player. I've been a slave to iTunes for too long. There's the proprietary software thing, for one. But also the fact that depending too much on its features can make switching to another application a real pain. Not all those features are really standardised.

I installed Amarok 2. It's showing potential, and I'm getting accustomed to the rather different interface, little by little. It's not without problems, though. First thing: none of the album artwork I added in iTunes is showing. OK, Amarok has a pretty nifty 'fetch album cover' feature, and a lot of that was corrected in a matter of minutes. Of course a good few covers were wrong, but they can be corrected individually, it's not an acute issue. (Except saving individual covers seems to have issues, some of the covers have reverted back after restarting, some haven't...)

The most serious problem, though, is handling albums with multiple artists. More precisely, they're not really handled at all. Each artist is listed separately, which is incredibly annoying. There's an option for tagging albums as 'various artists', but it is very buggy, the settings are apparently lost each time the music collection is re-scanned. I really hope this gets corrected soon.

11 February 2009

Going Home

Well, after bitching about Mac OS X's shortcomings for a long while, I finally took the plunge and installed GNU/Linux on my MacBook. (Why it took this long was mostly because I didn't have that USB disc to backup my stuff, until now.)

In case anyone is wondering why, let me reiterate. The reason is twofold.

1. Ideology. I'm a devoted supporter of the free software movement. While Mac OS X utilises many open source components, and as a Unix system is fairly compatible with a large number of free software applications, it is still a proprietary system, and many of Apple's policies I just can't agree with.

2. Functionality. While Mac OS X is a certified Unix system, it's focus is on its own desktop environment, which doesn't intergrate perfectly with the Unix core, its command line interface or other Unix software not tailored for OS X. GNU/Linux systems (and probably most other Unix-like systems as well) are much more configurable, use the standard X Window System and are generally more 'whole', not suffering from an identity crisis as OS X is.

Debian GNU/Linux was the obvious choice, as I said before. Installing it on a MacBook isn't exactly a trivial matter, but following instructions on Debian's wiki page it wasn't actually too difficult, even though on the first try I ended up with kernel panic and had to do it all over again. In the end it booted without problems, though, and most features work fine pretty much 'out of the box'. (I still have a small partition with Mac OS X as a backup, and because a pure Debian system apparently still has some issues.)
There's still plenty of configuring to do, of course. The touchpad works, but needs tuning. I haven't been able to figure out how to get custom settings to work yet. And I haven't got wireless yet. It seems that this would require upgrading the kernel to a newer version, which is something I've never done before.

I might have been worried that I'd grown too accustomed to OS X's eye candy and convenient features. Well, I installed KDE 4, and it has certainly softened the blow. It looks pretty, and has pretty much all the desktop and window management features of OS X, such as a grid view of all the virtual desktops. And a slideshow mode for my many wallpapers.

For now, I'm just happy to be back home in a proper free software *nix.

6 February 2009

Do As I Say Not As I Do

Computers 101: you don't, repeat don't, go a year and a half without backing up anything on your computer.

Luckily mister Murphy was kind and nothing went wrong this time. I'd been meaning to get a USB hard drive for ages, probably almost as long as I've had this MacBook. But, mostly due to lack of funds, kept putting it off, until I finally got one now. Now everything's backed up, and I feel much safer. The music alone would have been a huge loss if something had gone wrong, ripping all of it again would be more than I could bear...

I think it's time for a fresh start for this computer. A year and a half's worth of accumulated junk needs purging. I might also be interested in trying another OS. It'd almost certainly be Debian GNU/Linux.

2 February 2009

Blood and Chocolate

M&M's have recently appeared in stores in Finland. They're such an institution in America and referred to so often in movies and TV that naturally I had to try them. Well, they're OK, I guess, but really nothing new. We've got plenty of brands already that taste pretty much identical to these. The smaller 45g packet size seemed convenient, though.

I finally saw the new Rambo. It was... well, shorter and simpler than I would have expected. But that's not necessarily bad. It seemed to capture the feel of the early movies well, with its grim message about the ongoing madness and tragedy of war. And of course it has some of the most impressive looking (and gruesome) violence ever seen. (And Julie Benz!)