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