View previous topic :: View next topic |
Author |
Message |
ChrisG631 n00b
Joined: 14 Feb 2005 Posts: 30
|
Posted: Fri May 26, 2006 7:17 am Post subject: Conky - Battery Life |
|
|
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 |
|
|
entox n00b
Joined: 19 Jun 2005 Posts: 36
|
Posted: Wed May 31, 2006 4:10 pm Post subject: |
|
|
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 |
|
|
/carlito Guru
Joined: 31 Dec 2004 Posts: 451 Location: Belgium
|
Posted: Wed May 31, 2006 5:07 pm Post subject: |
|
|
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 |
|
|
Chewieip Tux's lil' helper
Joined: 16 Jul 2004 Posts: 79 Location: Girona, Spain
|
Posted: Tue Feb 13, 2007 10:25 am Post subject: |
|
|
Maybe is too late, and a new version of Conky is available but I've just configured my conky with
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 |
|
|
|