You are not logged in.

#1 2011-03-29 15:09:11

mrmylanman
Member
From: Altamonte Springs, FL, USA
Registered: 2011-03-13
Posts: 178

[SOLVED] A way to find out battery life on Thinkpad X120e (Openbox)

Hey all,

I have a Lenovo Thinkpad X120e which I absolutely love, and it's (mostly) working great with Arch.  The biggest nitpick I have so far is that it doesn't seem to readily show me my battery life.  I have an Openbox environment set up, with a Conky display and Tint2 for the panel.

When I run the "acpi -b" command, I am presented with the battery life and time-remaining without any issues or errors, however when I try to use the "battery_percentage" variable in Conky or the Battery field in Tint2, it seems to just not display anything.

Example acpi -b output:

[mylan@mylan-laptop ~]$ acpi -b
Battery 0: Charging, 98%, 00:09:41 until charged

Hopefully I can get this squared away.  The laptop has a light that changes to orange when it's low (under 20%), but I'd like to know more exactly, as well as when it's charged (the light doesn't relay that unfortunately).

Thanks!

Last edited by mrmylanman (2011-03-29 15:56:57)


Arch user since 2011-03-13

Thinkpad X220 Intel Core i7-2640M CPU, 16GB DDR3-1333 RAM, 160GB Intel SATA II SSD & 60GB OCZ mSATA SSD, 12.5" IPS 1366x768 Display, 6-cell Battery
(Installation date:  2012-03-19)

Offline

#2 2011-03-29 15:26:52

lagagnon
Member
From: an Island in the Pacific...
Registered: 2009-12-10
Posts: 1,087
Website

Re: [SOLVED] A way to find out battery life on Thinkpad X120e (Openbox)

If you install "acpitool", then the command "acpitool -B" will give you all the info you will ever need about your battery status. You could then use conky to display any given output from that command.


Philosophy is looking for a black cat in a dark room. Metaphysics is looking for a black cat in a dark room that isn't there. Religion is looking for a black cat in a dark room that isn't there and shouting "I found it!". Science is looking for a black cat in a dark room with a flashlight.

Offline

#3 2011-03-29 15:27:42

stlarch
Member
From: hell
Registered: 2010-12-25
Posts: 1,265

Re: [SOLVED] A way to find out battery life on Thinkpad X120e (Openbox)

On mine, I do {battery_percent BAT1}. You may need to change the 1 to 0? (Conky)

Offline

#4 2011-03-29 15:56:18

mrmylanman
Member
From: Altamonte Springs, FL, USA
Registered: 2011-03-13
Posts: 178

Re: [SOLVED] A way to find out battery life on Thinkpad X120e (Openbox)

Thanks I must have been missing the acpitool package.  That solved it!


Arch user since 2011-03-13

Thinkpad X220 Intel Core i7-2640M CPU, 16GB DDR3-1333 RAM, 160GB Intel SATA II SSD & 60GB OCZ mSATA SSD, 12.5" IPS 1366x768 Display, 6-cell Battery
(Installation date:  2012-03-19)

Offline

Board footer

Powered by FluxBB