Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Conky - Battery Life
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
ChrisG631
n00b
n00b


Joined: 14 Feb 2005
Posts: 30

PostPosted: Fri May 26, 2006 7:17 am    Post subject: Conky - Battery Life Reply with quote

I don't know how to get conky to display the percentage of my battery life on my laptop. It will only show "charging" or "discharging".
The output of acpi -V is:
Code:

Battery 1: charged, 100%
No support for device type: thermal
AC Adapter 1: on-line


My .conkyrc file has:
Code:

${color green}Battery:$color ${battery BAT1}%


Anyone know the syntax for the .conkyrc file to display how much battery life is left?
Back to top
View user's profile Send private message
entox
n00b
n00b


Joined: 19 Jun 2005
Posts: 36

PostPosted: Wed May 31, 2006 4:10 pm    Post subject: Reply with quote

Hi
Conky itself doesn't support this directly ...
But you can use this little workaround:
Code:
Remaining: ${execi 10 acpi -b|tr -s ' ' | cut -d ' ' -f5}
Back to top
View user's profile Send private message
/carlito
Guru
Guru


Joined: 31 Dec 2004
Posts: 451
Location: Belgium

PostPosted: Wed May 31, 2006 5:07 pm    Post subject: Reply with quote

The % isn't supported, but you can display the remaining time instead. Here's my relevant conkyrc part.
Code:
${color #BCBCBC}TURION 64: ${color }$freq_dyn MHz
${color #BCBCBC}TEMPERATURE: ${color } $acpitemp C
${color #BCBCBC}BATTERY: ${color } ${battery BAT1}
${color #BCBCBC}AC ADAPTER: ${color } $acpiacadapter


If you need to find out what variables conky supports natively you can check their homepage.
_________________

.O.
..O
OOO
Back to top
View user's profile Send private message
Chewieip
Tux's lil' helper
Tux's lil' helper


Joined: 16 Jul 2004
Posts: 79
Location: Girona, Spain

PostPosted: Tue Feb 13, 2007 10:25 am    Post subject: Reply with quote

Maybe is too late, and a new version of Conky is available but I've just configured my conky with

Code:


${battery_time}



As /carlito said, the better way is look up on Conky's official website, on the variables page. It solved out my problems.
_________________
El único caso en que P= NP es cuando N = 1.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum