1234567891011121314 |
- #!/bin/sh
- declare -i ID
- ID=`xinput list | grep -Eo 'SYNA7300:00 06CB:177C\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}' | tail -1`
- declare -i STATE
- STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
- if [ $STATE -eq 1 ]
- then
- xinput disable $ID
- echo "Touchscreen disabled."
- else
- xinput enable $ID
- echo "Touchscreen enabled."
- fi
|