Monday 21 September 2009

A cheap little battery widget :)

I liked my last battery widget, but it was a bit resource-hungry, what with all the images and that...So in a previous Conky config, I came up with a quick and easy way to get a battery-widget-like-thing, by using two battery bars, one of which was for a battery that doesn't exist (so it always shows empty).

I used:
${battery_bar 40,165 BAT1}${voffset 10}${battery_bar 20,10 BAT2}

to get this:
From My Little Desktop Photos

4 comments:

  1. Hello! I found your blog when googling for conky battery on the Acer Aspire One. I really really like this widget and I think it is working for me! I originally had this line from someone else's .conkyrc:

    {color white}Battery: $color $battery

    which didn't work because I assume it didn't know what battery to look at!

    Do you know if it is possible to show the percentage of the battery left and the discharge time left in conky? Is it also possible to scale this little widget to about 1/4 of the original size? This itty bitty Acer doesn't have much screen real estate so when my text is size 6, this widget really stands out a bit too much.

    But, it works! Thanks so much for providing this.

    My email address is cdarby AT connect DOT carleton DOT ca

    Crystal

    ReplyDelete
  2. Ah ha! I figured it out. I just had to edit the numbers (height, width). That was easy. :) But, still don't know how to find the battery percentage or discharge time.

    ReplyDelete
  3. To get the battery percentage and discharge time, use the argument BAT1 for your battery_percent variable, like so:

    ${battery_percent BAT1}

    The default value is BAT0, but the Acer Aspire Ones use BAT1 for some reason :S

    ReplyDelete
  4. this is a great little software, thanks so much for posting this. It's always amazing to see creative people who put their work online for people to use. Thanks! :)

    ReplyDelete