It is currently Tue Mar 28, 2017 7:51 pm



Welcome
Welcome to antiX-forum.

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content, and access many other special features. Registration is fast, simple, and absolutely free, so please, join our community today!


Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: Conky and the Battery
PostPosted: Thu May 01, 2008 11:18 pm 
Offline
User avatar

Joined: Sun Oct 07, 2007 5:16 pm
Posts: 1520
Location: Canada's South Coast
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


Top
 Profile  
 
 Post subject:
PostPosted: Thu May 01, 2008 11:55 pm 
Offline
User avatar

Joined: Fri Oct 26, 2007 3:56 am
Posts: 316
Location: UK
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! :) Try it, it may work for you as well.


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 12:41 am 
Offline
User avatar

Joined: Sun Oct 07, 2007 5:16 pm
Posts: 1520
Location: Canada's South Coast
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


Top
 Profile  
 
 Post subject: Here is what I use to get my battery state
PostPosted: Fri May 02, 2008 7:27 am 
Offline
User avatar

Joined: Tue Feb 26, 2008 10:31 am
Posts: 58
Location: United States
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.

_________________
IRC Channels:
irc.freenode.net #antix
chat.zoite.net #antix
The Unix Philosophy "Make each program do one thing well."


Top
 Profile  
 
 Post subject:
PostPosted: Fri May 02, 2008 2:42 pm 
Offline
User avatar

Joined: Sun Oct 07, 2007 5:16 pm
Posts: 1520
Location: Canada's South Coast
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


Top
 Profile  
 
 Post subject: yeah...
PostPosted: Fri May 02, 2008 4:49 pm 
Offline
User avatar

Joined: Tue Feb 26, 2008 10:31 am
Posts: 58
Location: United States
That is why I used awk to display only the information I wanted it to.

_________________
IRC Channels:
irc.freenode.net #antix
chat.zoite.net #antix
The Unix Philosophy "Make each program do one thing well."


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
suspicion-preferred