jradavenport / batlog

1 Year of MacBook Air Battery Logs
BSD 2-Clause "Simplified" License
189 stars 35 forks source link

Add linux script #7

Open giodamelio opened 10 years ago

giodamelio commented 10 years ago

This is super awesome, I am totally going to do this too. I'm on Linux, so here is a script with similar output.

gayprogrammer commented 10 years ago

I would like a Linux script too, but I don't have upower. I have acpi. But I think a portable Linux solution is something like cat /sys/class/power_supply/BAT0/energy_now

giodamelio commented 10 years ago

Hmm, thats probably true, but thats more work for the same information. I would add an options to choose, but I would rather keep it to a minimum since it runs so often. Maybe it should get the command to run as an argument, then you can just set it when you setup the cron?