On Sat, Sep 15, 2007 at 01:49:17PM -0700, Amit wrote:
I've tried modifying the .xinitrc to contain the battery percentage
level from apm but I cannot seem to get it. What is the proper way
to do this?
I use this script:
http://oni.tomodachi.de/~mitch/tmp/battery.pl
Call it with -s to get a
MAX_BATTERY_CAPACITY=84240
while true
do
echo `date '+%Y%m%d %H:%M'` `uptime | sed 's/.*:
\(.\...\),.*/\1/'` $(( (`cat /proc/acpi/battery/BAT0/state | grep
remaining capacity | sed 's/.*: \{5,\}\(.*\) mWh/\1/'` * 100) /
$MAX_BATTERY_CAPACITY))%
sleep 20
done |
Thank you for all the responses.
Actually right now, I am using apm. I am not sure if acpi is supported
on my notebook. This is an old PowerBook G4 500MHz. I will try
modifying the scripts to use apm instead of acpi.
Amit
On 9/16/07, Amit [EMAIL PROTECTED] wrote:
Actually right now, I am using apm. I am not sure if acpi is supported
on my notebook. This is an old PowerBook G4 500MHz. I will try
modifying the scripts to use apm instead of acpi.
If it's a PowerBook G4, then it's using PMU, not ACPI nor APM.
On Sep 16, 2007, at 4:34 PM, Amit wrote:
Thank you for all the responses.
Actually right now, I am using apm. I am not sure if acpi is supported
on my notebook. This is an old PowerBook G4 500MHz. I will try
modifying the scripts to use apm instead of acpi.
Amit
I just use something like
Hey guys,
I've tried modifying the .xinitrc to contain the battery percentage
level from apm but I cannot seem to get it. What is the proper way to
do this? I am sure many of you have this on your status bar. Any hints
or suggestions on how to approach this issue?
Thanks,
Amit
You will probably be using acpi instead of apm.
Install 'powersave' or just type 'acpitool'.
$ powersave -b
Battery: 100 %
AC is online.
$ acpitool
Battery #1 : charged, 100.0%, -462:00:00
AC adapter : on-line
Thermal zone 1 : ok, 63 C
$ acpitool -b
Battery #1 : charged,
* Amit [EMAIL PROTECTED] [070916 00:51]:
Hey guys,
I've tried modifying the .xinitrc to contain the battery percentage
level from apm but I cannot seem to get it. What is the proper way to
do this? I am sure many of you have this on your status bar. Any hints
or suggestions on how to
On Sat, Sep 15, 2007 at 11:04:15PM +0200, pancake wrote:
You will probably be using acpi instead of apm.
Install 'powersave' or just type 'acpitool'.
$ powersave -b
Battery: 100 %
AC is online.
$ acpitool
Battery #1 : charged, 100.0%, -462:00:00
AC adapter : on-line