- #!/bin/bash
- #"PS/2 Generic Mouse"是我的电脑识别到的触摸板的名字,你的可能不一样,用xinput --list查看一下
- status=$(xinput list-props "PS/2 Generic Mouse" | grep "Device Enable" |cut -d ' ' -f3)
- echo $status
- if [ $status -ge 1 ];then
- xinput --disable "PS/2 Generic Mouse"
- else
- xinput --enable "PS/2 Generic Mouse"
- fi
- #该片段来自于http://www.codesnippet.cn/detail/100920135759.html
来源: http://www.codesnippet.cn/detail/100920135759.html