You are not logged in.
Pages: 1
Topic closed
What's the trick? When I put ${battery} in .conkyrc, it doesn't show anything at all
Last edited by synthead (2007-09-14 07:25:48)
Offline
${battery BAT1}
or whatever number your battery is...
you can also get battery time left with
${battery_time BAT1}
Offline
Nice, worked great!
But what if I want to display the percentage without displaying "discharging"?
Offline
You could probably do it this way:
1) Create a script called, say, readbattery.sh which looks something like that:
#!/bin/bash
acpi -b | awk '{print $4}' | sed -e s/,//
2) Make the script executable.
3) Call it from conky usung "execi" command. Something like
${execi 30 /path/to/readbattery.sh}
would execute the screen every 30 seconds and update the battery charge level info appropriately.
Last edited by fwojciec (2007-09-11 13:25:03)
Offline
Well, aren't you clever.
I'll try it when I get back home, thanks for sharing your expertise!
Offline
Not my clever idea, actually Found this solution, or similar, somewhere on these forums a while back (here: http://bbs.archlinux.org/viewtopic.php?id=34647), and just made some simple changes to the script so it does what you wanted (just the percentage). This is just to clarify... So be thankful for the communal expertise of Arch community, I guess Let me know if it works, it should work...
Last edited by fwojciec (2007-09-11 20:05:46)
Offline
you can also use ${battery_percent BAT1}
We can't stop here! This is bat country!!
Offline
you can also use ${battery_percent BAT1}
Even better! Duh! Communal expertise in action
Offline
nice, works great now, really appreciate it guys!
Offline
sorry to raise a 10 year old thread...but i found it helpful...when i thought to try BAT0
First I tried changing BAT1 to BAT2, and then just BAT [but you need a #!]
so, i almost gave up...almost...but not quite, i knew i had to try BAT0 and it worked
I spent far too much time making an 80x80 avatar... + / -
Offline
sorry to raise a 10 year old thread
If you know it's wrong, don't do it.
Closed.
"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" - Richard Stallman
Online
Pages: 1
Topic closed