Battery indicator for the tmux status line (add to ~/.tmux.conf)
Displays the charge percentage and a unicode lightning bolt when the battery is charging. Makes use of the pmset command for battery information.
Tested on MacOSX Mountain Lion
set -g status-right "batt: #(pmset -g batt | awk 'NR==2 {gsub(/;/,\"\"\\); \
print (match($3,/^ch/\\) ? \"\⚡ \":\"\"\\) $2}') | %h-%d %H:%M "