I'm trying to get conky to display the battery levels but it claims there is no uevent file? I have confirmed in /proc that my battery is BAT1 but I don't see this file. Does anyone use this feature and can provide some guidance?
eriefisher
Conky and the Battery
6 posts
• Page 1 of 1
- Posts: 1,520 eriefisher
- Joined: 07 Oct 2007
- Posts: 316 DJiNN
- Joined: 26 Oct 2007
#2
eriefisher - i had the same problem with the battery on my laptop, and all i did was change the battery in conky from 1 to 0, and it worked fine. I kind of took the approach that most things in the computer world start with 0, not 1, and it paid off! __{{emoticon}}__ Try it, it may work for you as well.
- Posts: 1,520 eriefisher
- Joined: 07 Oct 2007
#3
I tried that but it could not find Bat0 so I switched to BAT1 and confirmed the related files where there in /proc/acpi/battery which shows BAT1 and not BAT0. I must be missing a related package somewhere.
eriefisher
eriefisher
- Posts: 58 Urban
- Joined: 26 Feb 2008
#4
Here is the command I run to have my battery displayed in conky:
execi 10 ~/.battery.sh
and in ~/.battery.sh I have this:
acpi -b | awk '{print $3, $4, $5}'
So I use the acpi package to display"discharging, 61%, 01:38:07"
Not the best way, but it was the way I got it working and it displays all the information I need. Also the seconds only update every 10 seconds which is a bit annoying, but I could adjust the execution rate rate. That would probably increase cpu usage though. If anyone can figure out how to embed the command directly into the .conkyrc that would be helpful.
execi 10 ~/.battery.sh
and in ~/.battery.sh I have this:
acpi -b | awk '{print $3, $4, $5}'
So I use the acpi package to display"discharging, 61%, 01:38:07"
Not the best way, but it was the way I got it working and it displays all the information I need. Also the seconds only update every 10 seconds which is a bit annoying, but I could adjust the execution rate rate. That would probably increase cpu usage though. If anyone can figure out how to embed the command directly into the .conkyrc that would be helpful.
- Posts: 1,520 eriefisher
- Joined: 07 Oct 2007
#5
Ok, I found a way around this. I installed acpitool and put this line in conky:
${color white}ACPI:
${color white}${execi 10 acpitool}
I also had to widen the text area a little to accommodate the width. This will give you charging/discharging %, AC adapter on/off-line and Thermal zone????
eriefisher
${color white}ACPI:
${color white}${execi 10 acpitool}
I also had to widen the text area a little to accommodate the width. This will give you charging/discharging %, AC adapter on/off-line and Thermal zone????
eriefisher
- Posts: 58 Urban
- Joined: 26 Feb 2008
#6
That is why I used awk to display only the information I wanted it to.