SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#1 2011-04-13 08:46:44

achristoffersen
#! Junkie
Registered: 2009-03-23
Posts: 354

really basic: remaining battery time and percent in conky (wheezy)

Hi guys,

I am most likely to blame for something (I always am) but anyways:  conky's battery_bar etc. did not work for me. So I googled and found references to at proc file i could concatenate. However, I don't have a battery file in my /proc dir, so this I what I did instead:

Remaining: ${execi 60 acpi -b | awk '{print$5}'} ${alignr} (${execi 60 acpi -b | awk '{print $4}' | cut -b -3})       

Extremely simple - but since I could find the solution to the problem I had, maybe this will help someone.

Good day
Andreas

Offline

Help fund CrunchBang, donate to the project!

#2 2011-04-13 09:07:05

saneks
#! Die Hard
Registered: 2009-10-01
Posts: 719

Re: really basic: remaining battery time and percent in conky (wheezy)

hmm, all i see is a line "remaining" a space and then two brackets close to each other.. but I just copied your line over and am probably to blame for something, too..

Last edited by saneks (2011-04-13 09:08:56)


eee701 user & other lap/desktops

Offline

#3 2011-04-13 10:41:55

achristoffersen
#! Junkie
Registered: 2009-03-23
Posts: 354

Re: really basic: remaining battery time and percent in conky (wheezy)

what happens if you call

acpi -b

in terminal? You should get something like:

Battery 0: Discharging, 100%, 04:35:22 remaining

The above commands works then takes that output, and feeds it to awk, which then takes the 5th field (the time). The same thing is happening with the next command, only I now take the fourth field (remaining percent). (I use cut to only show 3 charachters)

If you dont have acpi - then maybe install it?

Offline

#4 2011-08-30 06:26:11

typewriterjason
#! CrunchBanger
Registered: 2011-08-28
Posts: 183

Re: really basic: remaining battery time and percent in conky (wheezy)

I'm not sure if it's because it's Statler or not, but I get no response from:

acpi -b

other than:

bash: acpi: command not found


Fortune favors the bold.
#! WALDORF (just converted)
Asus EEEPC 1001PXD
2GB RAM

Offline

#5 2011-08-30 06:47:23

Istvan
#! CrunchBanger
From: Budapest, Hungary
Registered: 2010-02-20
Posts: 147

Re: really basic: remaining battery time and percent in conky (wheezy)

sudo aptitude install acpi


Ha ezt el tudod olvasni, biztosan nem vagy rövidlátó.

Offline

#6 2011-08-30 07:03:11

typewriterjason
#! CrunchBanger
Registered: 2011-08-28
Posts: 183

Re: really basic: remaining battery time and percent in conky (wheezy)

Ah, thanks for the install tip. I was apt-getting but getting nowhere (still fairly new).

Here's what I get from:

/etc/pm/power.d$ acpi -b

Battery 0: Full, 100%

That's when it's plugged in.

And here's with it unplugged...

Battery 0: Discharging, 100%, 03:10:13 remaining

So that works. But the 'remaining' line in my conky just has (100) in it with no time code...

Last edited by typewriterjason (2011-08-30 07:03:47)


Fortune favors the bold.
#! WALDORF (just converted)
Asus EEEPC 1001PXD
2GB RAM

Offline

#7 2011-08-30 07:29:16

machinebacon
#! unstable
From: PRC
Registered: 2009-07-02
Posts: 6,212
Website

Re: really basic: remaining battery time and percent in conky (wheezy)

Post your issue in the "Monthly Conky" forums, you get an answer at once smile
http://crunchbanglinux.org/forums/topic … ky-thread/


Start Distrohopping here! -> Break your own... cool  VSIDO  cool LinuxCNC  kiss Frugalware <- It's all just a kernel.

Offline

#8 2012-08-06 02:15:21

CrunchyLinux
Member
Registered: 2012-08-06
Posts: 29

Re: really basic: remaining battery time and percent in conky (wheezy)

you could of just done:

Battery:$alignr ${battery_percent BAT1}%

i dont have a battery file in there either big_smile


As a programmer i often ask myself could i get out of taking spanish in school because i know two  languages Python and lua

Offline

#9 2012-08-06 02:19:10

CrunchyLinux
Member
Registered: 2012-08-06
Posts: 29

Re: really basic: remaining battery time and percent in conky (wheezy)

never mind that would only give you the percent not the time as well


As a programmer i often ask myself could i get out of taking spanish in school because i know two  languages Python and lua

Offline

#10 2012-08-06 02:26:41

pidsley
#! Die Hard
Registered: 2012-05-23
Posts: 1,348

Re: really basic: remaining battery time and percent in conky (wheezy)

Welcome to #! CrunchyLinux -- this thread is almost a year old and the OP hasn't posted since last September.

If you post a short introduction in the Introductions section we can welcome you properly.

Offline

#11 2012-08-06 19:48:59

CrunchyLinux
Member
Registered: 2012-08-06
Posts: 29

Re: really basic: remaining battery time and percent in conky (wheezy)

hehe i know i just thought id give some things i found out it maybe old but im sure some one out there is having a problem similar to this also just posted my intro


As a programmer i often ask myself could i get out of taking spanish in school because i know two  languages Python and lua

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo