LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Lightweight Battery Monitor (https://www.linuxquestions.org/questions/linux-software-2/lightweight-battery-monitor-4175427352/)

Buto 09-15-2012 01:46 AM

Lightweight Battery Monitor
 
I can't remember the name of this lightweight battery monitor. It was basically a bar you can make any color that went along the side of your monitor or the top. So you basically didn't even know it was there unless you were really looking for it. Anyone know the name of it?

suttiwit 09-15-2012 02:09 AM

Couldn't remember, but, you can code one yourself! You will need C compiler, acpi, stdio.h, stdlib.h and a good text editor.
Here is the code:
Code:

#include <stdio.h>
#include <stdlib.h>

int main()
{
for (;;)
{
system("acpi -V");
system("sleep 0.5");
system("clear");
}
return 0;
}

And you can compile this with gcc:
Code:

gcc script-name.c
Where "script-name.c" is the name of code you saved.
And run it with:
Code:

./a.out
You should see it monitoring in real-time. Just put the terminal window some where.
Hope it helps! :)

jmccue 09-16-2012 09:27 AM

I think you are referring to xbattery(1). I use to use that but it does not seem to work with newer kernels. You can try asapm to see if that is good enough.

John

Habitual 09-16-2012 10:15 AM

Sounds like conky.


All times are GMT -5. The time now is 12:58 AM.