#!/usr/bin/perl #Kamin Whitehouse Oct 17 2004 #this script shows the status of the AC power and batter. it requires the xosd library to be installed. #I have it hot-keyed to Ctrl-Alt-Shift-P $apm=`apm`; $apm =~ /.* (.*)%/; $percentage=$1; if(`apm` =~ /on-line/) { $status="in"; } else{ $status="out"; } system "osd_cat -b percentage -P $percentage -d 1.5 -c yellow -f -adobe-utopia-bold-r-*-*-19-*-*-*-*-*-iso8859-* -O 6 -T 'battery $percentage%; AC $status'";