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

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