home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / etc / acpi / thinkpad-stretchortouchpad.sh < prev    next >
Encoding:
Linux/UNIX/POSIX Shell Script  |  2006-10-15  |  891 b   |  36 lines

  1. #!/bin/sh
  2.  
  3. # Lenovo rock.  They have changed the function of the Fn-F8
  4. # combination on the LenovoPads from stretching the display (in
  5. # hardware/BIOS) to toggling the touchpad on and off.
  6. #
  7. # Unfortunately they didn't bother to change the DMI strings
  8. # consistently...  so some of the new machines say 'LENOVO' and some
  9. # still say 'IBM'.  Yay for consistency(!).
  10.  
  11. # So:
  12. # IBM && !Series60   => nothing
  13. # IBM && Series60    => Touchpad toggle
  14. # LENOVO && ThinkPad => Touchpad toggle
  15.  
  16. toggle_touchpad=0
  17.  
  18. system_manufactuer=`dmidecode -s system-manufacturer`
  19. case "$system_manufactuer" in
  20.     IBM*)
  21.     system_version=`dmidecode -s system-version`
  22.     case "$system_version" in
  23.     ThinkPad\ [TXZ]60*)
  24.     toggle_touchpad=1
  25.     ;;
  26.     esac
  27.     ;;
  28.     LENOVO*)
  29.     toggle_touchpad=1
  30.     ;;
  31. esac
  32.  
  33. if [ "$toggle_touchpad" -ne 0 -a -x /etc/acpi/asus-touchpad.sh ] ; then
  34.     /etc/acpi/asus-touchpad.sh
  35. fi
  36.