Comment 36 for bug 357673

Revision history for this message
Kees Cook (kees) wrote : Re: No notification when sliding audio volume, muting volume, sliding LCD brightness on X31, X32, T60, R50e, T42, R52

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

it'll need inotify-tools installed...