#!/bin/sh device=12 state=$(xinput list-props "ETPS/2 Elantech Touchpad" | grep "Device Enabled" | grep -o "[01]$") if [ $state == '1' ];then xinput --disable "ETPS/2 Elantech Touchpad" else xinput --enable "ETPS/2 Elantech Touchpad" fi