instead of the sleep 1 loop (which may drain battery a bit from all the polling), maybe use:
while read file event
do
case "$file" in
*/volume)
# take volume actions here
;;
*/brightness)
# take brightness actions here
;;
esac
done < inotifywait -qm -e modify /proc/acpi/ibm/volume /proc/acpi/ibm/brightness
instead of the sleep 1 loop (which may drain battery a bit from all the polling), maybe use:
while read file event ibm/volume /proc/acpi/ ibm/brightness
do
case "$file" in
*/volume)
# take volume actions here
;;
*/brightness)
# take brightness actions here
;;
esac
done < inotifywait -qm -e modify /proc/acpi/
it'll need inotify-tools installed...