Skip to content

Instantly share code, notes, and snippets.

@RJHsiao
Created June 19, 2011 18:59
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RJHsiao/1034606 to your computer and use it in GitHub Desktop.
Save RJHsiao/1034606 to your computer and use it in GitHub Desktop.
Shell script for set TrackPoint's Speed & Sensitivity with login
#! /bin/bash
if [ ! -w /sys/devices/platform/i8042/serio1/serio2/sensitivity -o ! -w /sys/devices/platform/i8042/serio1/serio2/speed ];then
gksu --description "Get write permission to set TrackPoint's Speed & Sensitivity" chmod g+w /sys/devices/platform/i8042/serio1/serio2/sensitivity /sys/devices/platform/i8042/serio1/serio2/speed
fi
if [ `cat /sys/devices/platform/i8042/serio1/serio2/sensitivity` -ne 255 -o `cat /sys/devices/platform/i8042/serio1/serio2/speed` -ne 120 ]; then
echo -n 255 > /sys/devices/platform/i8042/serio1/serio2/sensitivity
echo -n 120 > /sys/devices/platform/i8042/serio1/serio2/speed
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment