Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-18 Thread Christian Garbs
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

Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-16 Thread Albert Cardona
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 |

Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-16 Thread Amit
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

Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-16 Thread Riccardo Murri
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.

Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-16 Thread James Turner
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

[dwm] Proper way of monitoring battery level in DWM

2007-09-15 Thread Amit
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

Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-15 Thread pancake
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,

Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-15 Thread Alexander Polakov
* 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

Re: [dwm] Proper way of monitoring battery level in DWM

2007-09-15 Thread Xavier
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