From bcb2963fc998e1ec2ae16d4617589018d44ce42d Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Mon, 10 Jan 2022 21:58:08 -0600 Subject: [PATCH] added check for connection --- huion-tablet-setup.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/huion-tablet-setup.sh b/huion-tablet-setup.sh index aa2e9dd..7f5f882 100644 --- a/huion-tablet-setup.sh +++ b/huion-tablet-setup.sh @@ -17,6 +17,11 @@ # Make sure to install xf86-input-wacom (might have to restart) # Add this script to autostart of your DE or .profile or somehow make it run at boot (so that it works in case the tablet is connected at boot) +if [ $(xsetwacom --list | grep -c "HID 256c:006d") -ne "2" ]; then + echo "No supported devices found!" + exit +fi + sleep 1 xsetwacom --set 'HID 256c:006d Pen stylus' Button 2 "2" # middle mouse button