chris blogs

16aug2010 · 23, 027, 0x17

Your sister is concerned about Smallville for the Russian drug. Hollywood is amiable and the saber is communist. Condoleeza Rice serves the naughty saber. Hillary Clinton harasses Jimmy Hoffa and his user’s manual. The ukelele in London is opaque. The atomic message torments the polluted phased plasma rifle in headquarters. Dilbert made fun of the Vatican and disguises the gyroslugger. Britney Spears discovers the diseased sex toy. The implement from Iraq will go to the Bastille. The dancing trumpet is rubber. Osama bin-Laden was infiltrated by the Shire and assassinates the frame. T’Pol assumed responsibility for the Vatican for the amiable cummerbund. The drug-crazed cauliflower allies with the disguised elephant. President Bush takes blame for the editorial department and transforms the light bulb. Condoleeza Rice takes his hot tub and is commanded by the Bastille. You must meet the A.C.L.U. at Munich and get the illuminated infant. A 911 file from Buckingham Palace tortures the submarine. Abraham Lincoln originates from Cheyenne Mountain and berates the Klingon. The amulet disobeys the greedy shark. Tony Blair is the ski lift; Saddam Hussein is the patron of Lithuania. The petunia from Atlantis will go to Alpha Centauri. The sexy racquetball serves the besotted (censored). Isaac Asimov alters the shiftless shark and the slippery fly.

NP: Arcade Fire—Neighborhood #2 (Laïka)

06aug2010 · xlbiff with maildir

I am not a friend of popup notification nor mail checking, and for years I followed a rather strict rule of only actively checking mail and then reading it.

This post by Chris Siebenmann changed my view of that, and I decided to give xlbiff a try.

A short overview of my custom mail setup: I use offlineimap to sync a set of local maildirs with Gmail. I run a local Dovecot and then access my mail with Gnus (or theoretically any other IMAP client). Outbound mail is handled by Postfix with a Gmail as smart-host.

This sounds like a contrived setup for a notebook, but it actually is very useful. I can read and write mail offline, as well as use classic Unix tools and scripts such as mail(1) to send mail.

Anyway, xlbiff by default monitors a Unix mailbox which I don’t use. I have thus adjusted it to use my local maildirs as input. xlbiff makes this rather easy as it can use user-supplied “check” and “scan” scripts.

The check script, called xlmdcheck, sees if the state of mail has changed. It returns 1 if nothing has changed, 2 if no unread mail exists and 0 if it should popup the window with the output of the scan script.

#!/bin/sh
# xlmdcheck - xlbiff script to check maildirs

HASH=$(ls ~/Mail/*/*/*2, | grep -v "Sent Mail" | cksum | cut -b1-9)
echo $HASH
if [ $2 -ne $HASH ]; then
  if [ $HASH -eq 429496729 ]; then  # empty output
    exit 2
  else
    exit 0
  fi
fi
exit 1

Then, the scan script, called xlmdscan, to output a summary line for each unread mail:

#!/bin/sh
# xlmdscan - xlbiff script to output summary of maildirs

ls ~/Mail/*/*/*2, | grep -v "Sent Mail" |
  xargs -i scan -file '{}' -width $(expr $2 + 7) -form scan.timely | cut -b7-

This uses MH’s scan(1) to parse the headers, but we cut off the initial numbering which gets lost due to the xargs. Oh well.

Finally we can run it:

% xlbiff -scanCommand "xlmdscan %s %d" -checkCommand "xlmdcheck %s %d"

A screenshot of the thing in action:

xlbiff in action

NP: Love—The Good Humor Man He Sees Everything Like This

24mar2010 · chris blogs rebooted

After ages, suddenly chris blogs got rebooted!

I finally trashed my old blogging software Nukumi2, and moved chris blogs onto the same small script that also empowers Trivium.

A few things have changed or had to be changed:

  • Haloscan is gone, thus comments are gone for now as well. I thought they’d migrate to Echo transparently, but that at least seems to be broken.

  • The RSS feed and the Atom 0.3 feed is gone. All feeds now redirect permanently to the Atom 1.0 feed. Welcome to 2010!

    I won’t promise to blog more here now, but at least I’m not blocked by some old software I need to save from bit-rot.

Some trivia on the fork: It went down from 172 LoC to 162 LoC, 65 insertions/73 deletions, which proves my point that every blog has special needs and thus a custom script is worth it. Keeping backwards compatibility (no significant link should be broken) added lots of complexity.

NP: Princeton—Shout It Out

25feb2010 · Window management revisited

Two years ago I wrote Thoughts on window management, and in the meantime, I returned to using Linux computers for a really significant part of my digital life. Thus, it was time got pick a window manager again. I think I then tried just about every significant one and lots of unknown forks, experiments and abandoned ones.

Revisiting the ten points, I consider them still all to be valid and applied them with minor tweaks in my current setup.

A screenshot of my cwm setup

I now use the cwm window manager, an OpenBSD fork of calmwm which runs with a few small patches under any Unix. (I wrote an Arch PKGBUILD for it and also keep a Git mirror.)

cwm is a small window manager without many frills or decoration other than a simple border, but it has good and customizable keyboard control, and features just what I need: cwm uses “focus follows mouse” (the one true thing for X11 in my opinion) but does not use “click to raise”. Thus your window setup only changes when you really need it, and due to overlapping you can use your (always) limited screen space fully.

Each window can belong to one cwm group. I defined four groups: terminals, editors, browsers, distraction (e.g. IM, Twitter). By pressing the appropriate keybindings (Super-1 to Super-4), I can quickly toggle display of these windows.

Windows stay at their fixed size and position, though it is easy to maximize them full or vertically if I need it (most run vertically maximized anyway as it’s only 768 pixels). cwm doesn’t save positions, but many do it themselves or are started with appropriate geometry. Thus, spatial memory can be used as applications don’t jump around wildly.

Super-Button1 raises a window, while Super-Button3 lowers it. This is incredibly useful for an operation I call “drill-down”. Just press Super-Button3 a few times where you expect the window until you found it. This and Meta-Tab to switch between the last focused window are my main means of reaching lowered windows.

cwm itself doesn’t have a status bar, and only features a launch menu I rarely use: I wrote a status bar using conky and a launcher with dzen2. The status bar displays useful information on the top right like the time, current networks and my IP address on them, audio volume, CPU temperature, memory, CPU and battery usage as well as the currently playing song. On the top left there’s my launcher, which tries to switch to applications if they already run. I wrote a small script featuring xdotool for this task. There’s also a small dzen in the top right corner than locks my screen when I click on it.

This top bar is visible all the time, except for full-screen when watching a movie.

The structure of my desktop continues inside the applications: Almost everything uses tabs (Firefox, Pidgin, Emacs, URxvt with tmux), and I configured all applications to use Meta-Left/Right for switching tabs. Conformity really pays out here once you have the keybindings in muscle memory. In general, I only have one window open of any kind and use tabs to multiplex them. But when I really need to look at a few things at once, I can just drag out the tab (or copy the tmux session) into a new window. I rarely need other windows than these, most things are done in the shell, Emacs or the browser.

NP: Gang of Four—Natural’s Not In It (Ladytron Remodel)

24dec2009 · Merry Christmas!

Santa spanking

Frohe Weihnachten, ein schönes Fest, und einen guten Rutsch ins neue Jahr wünscht euch Christian Neukirchen

Merry Christmas and a Happy New Year!

NP: Neutral Milk Hotel—The Fool

19dec2009 · A nasty Android bug

When your Android phone shows the following symptoms:

  • Upon power on, some configuration (e.g. date/time format) is lost.
  • The “hang up” button doesn’t lock the screen.
  • “Airplane mode” and “Silent mode” don’t show up in the shutdown menu.
  • The “home” button doesn’t work.
  • The “call” button doesn’t work.
  • Incoming calls don’t work. (Don’t know for sure.)

…then your phone probably destroyed some configuration, likely because the battery was empty before it fully shut down. A possible fix:

  • Get the application “Any Cut”.
  • Create a shortcut to the activity “Setup Wizard” (there are three items of it, try them all).
  • Run the Setup Wizard that looks like the initial Android setup (the one where you have to click the robot first), and follow the wizard.
  • Your phone should now work again.

This worked for me on firmware version 1.6 (And I think I hit the same problem on 1.5 too, but back then had no other idea than to wipe it).

Many people seem to be affected by this, and above solution is based on this thread.

Clearly, this is a thing that should not happen, corrupting configuration due to low power.

NP: Neutral Milk Hotel—The Fool

06dec2009 · Zum Advent

Vorweihnachtliche Stimmung beschreibt Lydia eh besser als ich.

Ausserdem kann ich einfach nicht wiederstehen, diesen Klassiker nochmal zu posten:

Inhalt des Gefrierschanks

wrongcards hat neue Weihnachtspostkarten: Christmas Deer, Someone Undermines Christmas, Everything is Fantastic, und natürlich Adequate Substitute for a Gift.

Sonst gibts noch eine kreative Weihnachtsdeko, und ein schönes Bild von Lichtern in Berlin.

Sterneschnippeln steht noch aus.

Ich wünsche einen frohen Advent.

NP: Tom Waits—Who Are You Cut

28sep2009 · Back from Curucamp 2009

I just came home from Vienna where I attended Curucamp 2009, the probably most unconference ever. ;-) We were about thirty people, and there was a fair share of interesting talks. Of course, there was a lot of socializing, too. We had real luck with the weather. And there even was a head measuring contest!

If you are interested in my slides about Simplicity in Code, you can find them at the usual place.

NP: Pearl Jam—Unthought Known

19sep2009 · Latest discoveries in hard disk archaeology

Recently I dug up an old hard disk (to be used in my Sun Blade 1000), and I found an old copy of my home directory on it. Even better, I found an even older backup of a thing I thought that was lost already: my first web site.

I could not resist putting it up, so here it is. I don’t think it ever went live, actually.

I made it in 2000/2001, so please bear with the bad English and table layouts. I also didn’t know of .png files, I guess.

The time stamp shows 2009, but that’s because I had to regenerate the site from its sources. It already used amazing technology: RCS-backed, make(1)-driven, and using cpp(1) for HTML generation is a hack I’m still proud of (well, except for the occasional <!-- ' --> to close an uneven number of quotes :-P).

NP: Pearl Jam—The End

11sep2009 · Hiking in Fassa Valley

The last few days I spent in the Dolomites and we did some hiking trips that I recorded with My Tracks:


View Tag #1 in a larger map


View Tag #4 in a larger map

(I forgot to stop recording at the end, thus I don’t have exact statistics.)


View Tag #7 in a larger map

Unfortunately I see no way to export the elevation graphs, which would have been interesting to compare.

Google Maps doesn’t have much detail for this terrain, I recommend looking at the larger maps and enabling photos for a rough idea.

NP: The Magnetic Fields—I Can’t Touch You Anymore

Copyright © 2004–2010