Skip to content

Instantly share code, notes, and snippets.

@jyc
Created January 7, 2013 01:23
Show Gist options
  • Select an option

  • Save jyc/4471539 to your computer and use it in GitHub Desktop.

Select an option

Save jyc/4471539 to your computer and use it in GitHub Desktop.
#! /bin/bash
## Trackpoint settings
# When run from a udev rule, DEVPATH should be set
if [ ! -z $DEVPATH ] ; then
TPDEV=/sys/$( echo "$DEVPATH" | sed 's/\/input\/input[0-9]*//' )
else
# Otherwise just look in /sys/
TPDEV=$(find /sys/devices/platform/i8042 -name name | xargs grep -Fl
TrackPoint | sed 's/\/input\/input[0-9]*\/name$//')
fi
# http://www.thinkwiki.org/wiki/How_to_configure_the_TrackPoint
# http://wwwcssrv.almaden.ibm.com/trackpoint/files/ykt3eext.pdf
#------------------------------------------------------------
if [ -d "$TPDEV" ]; then
echo "Configuring Trackpoint"
echo -n 255 > $TPDEV/sensitivity # Integer 128
Sensitivity
echo -n 110 > $TPDEV/speed # Integer 97 Cursor
speed
echo -n 4 > $TPDEV/inertia # Integer 6 Negative
intertia
echo -n 1 > $TPDEV/press_to_select
else
echo "Couldn't find trackpoint device $TPDEV"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment