respond-agent/.config/i3/touchpad

19 lines
470 B
Bash
Executable file

#!/bin/sh
declare -i ID
ID=`xinput list | grep -Eio '(touchpad|glidepoint)\s*id\=[0-9]{1,2}' | grep -Eo '[0-9]{1,2}'`
declare -i STATE
STATE=`xinput list-props $ID|grep 'Device Enabled'|awk '{print $4}'`
if [ $STATE -eq 1 ]
then
xinput disable $ID
# echo "Touchpad disabled."
# notify-send -a 'Touchpad' 'Disabled' -i input-touchpad
else
xinput enable $ID
# echo "Touchpad enabled."
# notify-send -a 'Touchpad' 'Enabled' -i input-touchpad
fi