« terminator | Main | Command line eject CD for the Mac »

Turn Synaptics Touchpad off in Linux

Battling with a terribly designed HP 4520s (oh for a Thinkpad), I had enough of hitting the stupid touchpad accidentally when typing. The following will turn the touchpad on and off accordingly. The script comes with no warranty, use at your own risk:


#!/bin/bash
#
# Turn that pesky touchpad on and off
#
# ----------------------------------------------------------------------------
id=`xinput list | grep TouchPad | awk '{print $6}' | sed 's/id=//'`
if [ $1 = 'on' ]; then
xinput set-prop $id "Device Enabled" 1
else
xinput set-prop $id "Device Enabled" 0
fi

About

This page contains a single entry from the blog

The previous post in this blog was terminator.

The next post in this blog is Command line eject CD for the Mac.

Many more can be found on the main index page or by looking through the archives.

Powered by
Movable Type 3.33