#!/bin/sh touchpad_name='ETPS/2 Elantech Touchpad' active="$(xinput list-props "$touchpad_name" | grep 'Device Enabled' | cut -f 3)" if [ "$active" -eq 1 ] then xinput disable "$touchpad_name" else xinput enable "$touchpad_name" fi