todo/[FR] No consistency check while on battery-onlygit-annexhttp://git-annex.branchable.com/todo/__91__FR__93___No_consistency_check_while_on_battery-only/git-annexikiwiki2015-02-10T18:33:20Zcomment 1http://git-annex.branchable.com/todo/__91__FR__93___No_consistency_check_while_on_battery-only/comment_1_b557db02c3719152d392fa454c9c5ce5/joey2015-02-04T20:10:42Z2015-02-04T19:48:10Z
<p>I agree this would be nice. However, how to detect if it's on battery?</p>
<p>Debian has a <code>on_ac_power</code> command which is rather complicated; 88 lines of
code that deal with APM, PMU (powerpc), and two different kernel interfaces
for ACPI (new sysfs and old /proc/acpi).</p>
<p>Then there's OSX, Windows, Android..</p>
<p>I'm going to move this from bugs to todo.</p>
comment 2http://git-annex.branchable.com/todo/__91__FR__93___No_consistency_check_while_on_battery-only/comment_2_374567f37635613a5d671c877d601367/rasmus2015-02-10T18:33:20Z2015-02-10T18:33:20Z
Yeah, probably it's more complicated than just checking <code>/sys/class/power_supply/BAT0/</code>... There's something called <a href="https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/pmset.1.html"><code>pmset</code></a> for macs, but I don't have a mac so I don't know how relevant it is. For Windows there seems also to be some sort of <a href="https://msdn.microsoft.com/en-us/library/windows/desktop/aa372659%28v=vs.85%29.aspx">api</a>, but again I don't know anything about windows...