dotfiles/.local/bin/touchpad_toggle

13 lines
304 B
Text
Raw Normal View History

2018-12-26 00:40:38 +01:00
#!/bin/bash
STATE=`xinput list-props "ETPS/2 Elantech Touchpad"|grep 'Device Enabled'|awk '{print $4}'`
echo $ID
if [ $STATE -eq 1 ]
then
xinput disable "ETPS/2 Elantech Touchpad"
notify-send 'Touchpad disabled'
else
xinput enable "ETPS/2 Elantech Touchpad"
notify-send 'Touchpad enabled'
fi
exit 0