I love to abuse my laptop battery by using my laptop for quite some time (up to 25 minutes) even after the battery meter hits 0%.
However, sometimes I forget about that or I am just away. This causes hard shutdown, which holds the potential to corrupt the filesystem.
What is the best way to tell the computer to automatically hibernate 15 minutes after the battery reports it's empty? My idea is to write a Ruby or Bash script that would periodically poll the appropriate /proc/
subystem, but I'm wondering whether there is anything in-built.
/sys/class/power_supply/BAT0/charge_now
. – Rok Kralj Sep 18 '13 at 18:47