#!/bin/ash

for i in /sys/class/power_supply/*; do
	cd $i
	[ "`cat type`" != Battery ] && continue
	[ ! -e scope ] && break
	[ "`cat scope`" = System ] && break
done

exec gxmessage -center -fn "mono 12" -title "Battery Info" -borderless -buttons OK:0 -fg black -bg thistle "$(for i in * ; do [ "$i" = 'uevent' ] && continue; [ -d "$i" ] && continue; echo -n "${i}: " && cat $i ; done)"