Sorry, that’s my * typo again, I edited to fix it (and to put back in the sh line). Try the current version in my last post.
cat Touchpad.bash
#!/bin/bash
Touchpad.bash
read TPdevice <<< $( xinput | sed -nre ‘/TouchPad|Touchpad/s/.id=([0-9]).*/\1/p’ )
state=$( xinput list-props “$TPdevice” | grep “Device Enabled” | grep -o “[01]$” )
if [ “$state” -eq ‘1’ ];then
xinput --disable “$TPdevice” && notify-send -i emblem-nowrite “Touchpad” “Disabled” 2> /dev/null
else
xinput --enable “$TPdevice” && notify-send -i emblem-nowrite “Touchpad” “Enabled” 2> /dev/null
fi
Thank you!! It is now working.
Thanks. With the help of @Whyhow I now have the original script working.
This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.