I want to know when my battery charge changes, and I don't want to simply run a daemon that checks on it every five seconds.
I've tried running
inotifywait -m /sys/class/power_supply/BAT1/capacity, but it doesn't register any modifications even though
cat-ing it every once in a while gives different results! In fact, it only reports something when I used
cat on it, or run
acpi. I've also tried running
inotifywait on other files in the BAT1 directory, and found out that none have been seen made modifications to - despite giving new results with
So why doesn't
inotifywait report modifications? And how can I get instant updates on changes in battery level if I can't use inotify?