#!/bin/sh # # touchpad - switch touchpad(s) on or off # # $Id$ # see http://askubuntu.com/questions/292583/how-to-disable-touchpad-running-ubuntu-12-04lts-on-dell-inspiron-1525 Die() { echo $0: $@ >&2; exit 1; } case "$1" in 0|off|no) state=0;; 1|on|yes) state=1;; *) Die Usage: $0 [on|off];; esac IFS= xinput | perl -lne '/touchpad|trackpad| ALP/i and /^\S*\s+\S+\s+(\S+(\s\S+)*)\s*id=/ and print $1' | while read name do xinput set-prop "$name" 'Device Enabled' $state done