Here is a little script, you can run it once per session and it won't be permanent after a reboot.
This has been tested under CentOS 6.x and RedHat 6.x
$ cat ~/touch-toggle.sh
#!/bin/bash
DEVID=$(xinput list|grep "PS/2 Generic Mouse"|sed -r 's,.*id=([0-9]+).*,\1,')
CRTSTATE=$(xinput list-props $DEVID|grep "Device Enabled"|sed -r 's,.*([0-1]),\1,')
NEWSTATE=$(expr 1 - $CRTSTATE)
echo "Toggle touchpad to new state: $NEWSTATE"
xinput set-int-prop $DEVID "Device Enabled" 8 $NEWSTATE
No comments:
Post a Comment