touchpad / trackpoint control scripts

This commit is contained in:
luxick
2016-12-30 12:26:19 +01:00
parent 48572363d3
commit 5f75f4dce6
2 changed files with 54 additions and 0 deletions

19
speed-up-trackpoint Executable file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
# Set Trackpoint sensetivity and speed up
TPDEV="/sys/devices/platform/i8042/serio1/serio2"
while true
do
if [ -d "$TPDEV" ]; then
echo "Configuring Trackpoint"
echo -n 255 > $TPDEV/sensitivity # Integer 128 Sensitivity
echo -n 255 > $TPDEV/speed # Integer 97 Cursor speed
echo -n 4 > $TPDEV/inertia # Integer 6 Negative intertia
echo "Done."
exit 0
else
echo "Couldn't find trackpoint device $TPDEV"
fi
sleep 1s
done
exit 1

35
touchpadcontrol Executable file
View File

@@ -0,0 +1,35 @@
#!/bin/bash
# Enable or diable Thinkpad Touchpad
toggle() {
STATUS=`xinput list-props 'SynPS/2 Synaptics TouchPad' | grep 139 | grep -o ".$"`
if [ $STATUS = "1" ]; then
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 0
else
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 1
fi
}
deactivate() {
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 0
}
activate() {
xinput set-prop 'SynPS/2 Synaptics TouchPad' 139 1
}
case "$1" in
toggle)
toggle
;;
disable)
deactivate
;;
enable)
activate
;;
*)
echo $"Usage: $0 {enable|disable|toggle}"
exit 1
esac
exit 0