Re: Conky Help
@Bruce. Thanks. Good to know my syntax is correct.
Unfortunately, I'm still a little stumped by what I should have if_existing refer to.
I'm pretty sure anonymous is on the right track but everything I've tried there hasn't worked.
/proc/acpi/battery/BAT0/state is a file whose contents are changed based on the state of the battery. If the battery is discharging and you were to enter
less /proc/acpi/battery/BAT0/state/ then you'd get an output that might look like this:
present: yes
capacity state: ok
charging state: discharging
present rate: 2671 mA
remaining capacity: 4389 mAh
present voltage: 12533 mVconky's if_existing command will check for the presence of that file and then based on that condition, execute whatever you want it to. Even better, you can have if_existing check the file of your choice for a specific string. So theoretically, I should be able to run this in conky:
${if_existing /proc/acpi/battery/BAT0/state discharging}which (if it were working as advertised) would mean that the if statement would only run if the battery were discharging. Unfortunately, that hasn't worked.
If anyone has any ideas, let me know...