I use this code in gnu screen's statusbar:
backtick 1 1 1 sh -c 'perl -ne "/^(la|re|st)[^:]+:\s+(\S+)\s/and \$h{\ +$1}=\$2}{\$h{st}=~s/of.*/-/;\$h{st}=~s/on.*/+/;printfq(%.0f%%%s),\$h{ +re}*100/\$h{la},\$h{st}" /proc/acpi/battery/BAT0/* /proc/acpi/ac_adap +ter/ACAD/state'
In reply to Re^3: Laptop Battery Percentage
by jimmy.tty
in thread Laptop Battery Percentage
by naildownx
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |