I'm in a similar situation but I opted for dwm since it's far more lightweight than Awesome.
For brightness, see
http://www.powerdeveloper.org/forums/vi ... f=1&t=2084
There are a couple ways to do it. I took the easy way out by letting a script handle it. The C program mentioned in the last post is probably nicer.
As for battery life, I use Conky to generate a status bar using the output of a script which calls upower to tell me how much time is left on the battery (or how much time is left to charge):
Code:
upower -i `upower -e | grep battery` | grep time | awk '{
if($3 == "empty:"){
if($5 == "minutes")
printf("Bat: %.1fM | ", $4)
else
printf("Bat: %.1fH | ", $4)
}
else{
if($5 == "minutes")
printf("Bat: -%.1fM | ", $4)
else
printf("Bat: -%.1fH | ", $4)
}
}'
(that's just a quick hack...if your awk-fu is stronger than mine, you can probably shrink it a bit)
Here's my .conkyrc
Code:
out_to_console yes
out_to_x no
background no
update_interval 2
total_run_times 0
use_spacer none
pad_percents 2
short_units
TEXT
${color #8193a6}\
${execi 10 echo "`/home/brandon/src/scripts/new_mail.sh`"}\
${execi 10 echo "`/home/brandon/src/scripts/new_news.sh`"}\
${execi 10 echo "`/home/brandon/src/scripts/battery_status.sh`"}\
${execi 10 [[ $(nm-online -xq) ]] || echo "[*] | "}\
CPU: $cpubar | \
Mem: $membar | \
${time %b %d %H:%M}
And the relevant line in my .xsession file:
Code:
conky | while read -r; do xsetroot -name "$REPLY"; done &
I think with Awesome you'll instead need to use their widgets and do everything in Lua, but hopefully this info can help a bit.