Two months and still nothing to write home about.

Been a while since the last update. I guess as the saying goes, “if you don’t have something good to say…” I have been learning haskell, using xmonad, and loving 64bit Arch Linux., so a few notes on each are in order.

Haskell

Haskell has been described as the algebra of programming, and is an advanced purely functional programming language. If your a math/language geek like myself, it’s rights up your alley. It’s been a delight to delve deeper into a language I previously had only a passing familiarity with.

Xmonad

Xmonad is a lightweight tiling window manager writen entirely in haskell and it’s rock solid stable because of it. The configuration file itself is a dynamically compiled haskell module, which means your free to do whatever you can within the limits of your knowledge. That’s how it should be. There’s a very fully featured set of community contributed extensions, xmonad-contrib, that provides many more extendable features and the community is helpful and intelligent. Both valuable traits.

Arch Linux

And finally Arch. After a week or two of struggling with Ubuntu/apt and some outdated packages I was so fed up I switch. Rsync’d my entire home directory to my backup server one final time, and did a fresh install of 64 bit Arch. Now least of all its’s nice to have access to all 4GB of RAM in my laptop. Boot times are quicker too.

In all things are snappier, and that make me a happy person.

Google Scrubs the cache for Chrome

According to this article at Computerworld google has scrubbed results for the download link for their new Chrome browser. If you get results like these:

It’s likely it won’t work.

No doubt this won’t be an issue once the Chrome Announcement is over.

Live video of Chrome Annoucement is available here

Switch+dzen

Well Ubunut Intrepid may turn out to be great, but the recent ubuntu upgrade on my part proved to me how tired I was of dealing with apt and it’s pkg management system. How many debian users actually know what it’s really doing?

So I switched. To Arch.

Lately it seems like every useful tip I’ve gleaned has been from either the gentoo or arch wiki, so I had narrowed it down to one of the two. Both are appealing for their BSD style init systems and simple script based pacakge systems. Gentoo is full source though which, while not really a negative for most modern systems, was something I didn’t want to be restricted to. Arch allows a flexible binary or source build system, although the actual repo’s are binary. I love the rolling kernel too, no more waiting 6 months to get the latest, risking a broken system by upgrading in between.

In the process of switching I have fine-tuned things to the extreme. One of the tweaks is the battery status bar I use. It’s just a simple shell script that outputs formatted text to dzen2. It always bugged me that the script didn’t notice the charging state. After a simple little change, it does.

#!/bin/sh
#
# original script by lyon8 <lyon8@gmx.net>
# modifications from original by <sean.escriva@gmail.com>
# show your laptop battery state in dzen
 
BG='#1c2636'  # dzen backgrounad
FG='#99ffff'  # dzen foreground
W=150         # width of the dzen bar
GW=50         # width of the gauge
GFG='#33ccff'  # color of the gauge
GH=7          # height of the gauge
GBG='#333'    # color of gauge background
X=1770        # x position
Y=1200        # y position
FN='snap'     # font
 
STATEFILE='/proc/acpi/battery/BAT0/state' # battery's state file
INFOFILE='/proc/acpi/battery/BAT0/info'   # battery's info file
 
LOWBAT=25        # percentage of battery life marked as low
LOWCOL='#ff4747' # color when battery is low
CHGCOL='#60da11' # color when battery is charging
TIME_INT=1       # time intervall in seconds
 
PREBAR='^i(/home/webframp/.dzen/icons/dzen_bitmaps/battery.xbm) ' # caption (also icons are possible)
 
while true; do
# look up battery's data
BAT_FULL=`cat $INFOFILE|grep design|line|cut -d " " -f 11`;
STATUS=`cat $STATEFILE|grep charging|cut -d " " -f 12`;
RCAP=`cat $STATEFILE|grep remaining|cut -d " " -f 8`;
 
# calculate remaining power
RPERCT=`expr $RCAP \* 100`;
RPERC=`expr $RPERCT / $BAT_FULL`;
 
# draw the bar and pipe everything into dzen
if [ $RPERC -le $LOWBAT ]; then
GFG=$LOWCOL;
fi
if [ $STATUS = 'charging' ]; then
GFG=$CHGCOL;
else
GFG='#33ccff';
fi
#echo -n $PREBAR #uncomment for an icon
eval echo $RPERC | gdbar -h $GH -w $GW -fg $GFG -bg $GBG
sleep $TIME_INT;
done | dzen2 -ta c -tw $W -y $Y -x $X -fg $FG -bg $BG -fn $FN