Geektool is even cooler than I thought…

Hacking away at Geektool I decided to try something else: sending raw terminal escape-codes at it and see how it handled it… In short: even better than I thought. So here is an update to my earlier Geeklet to display a calendar:

ESC="\\\033["; \
printf "\n$( cal| \
    sed "\
        s/^/ /; s/$/ /;\
        /^ Su.*/d;\
        /.*$( date +'%B %Y' ).*/d;\
        /^$/d;\
        s/$( date +%e ) /${ESC}1;37m$( date +%e )${ESC}0m /g;\
    "\
)\n"

I will admit to still using the previous version, though, since I prefer the font bolding in that one.