ACPI


TO get battery (and possibly CPU temperature) monitoring on supported laptops you need to run the ACPI daemon.


Add aux/acpi to /rc/bin/termrc.local

# start acpi
aux/acpi

You can now used stats -b to display a graph of the bettery charge. The following script will display the batetry status:

#!/bin/rc
# batt - display battery level
# usage: batt

rfork e

if(test -f /dev/battery){
	dt=`{awk '{print $1, $11, $12}' /dev/battery}
	echo Battery $dt(3) at $dt(1)^% $dt(2) remaining
}
if not{
	echo batt: /dev/battery not found!
	exit nobattery
}


/plan9/