aboutsummaryrefslogtreecommitdiff
path: root/home/dot_local/share/bin/executable_wacomtouch
diff options
context:
space:
mode:
Diffstat (limited to 'home/dot_local/share/bin/executable_wacomtouch')
-rw-r--r--home/dot_local/share/bin/executable_wacomtouch14
1 files changed, 14 insertions, 0 deletions
diff --git a/home/dot_local/share/bin/executable_wacomtouch b/home/dot_local/share/bin/executable_wacomtouch
new file mode 100644
index 0000000..6c1e51a
--- /dev/null
+++ b/home/dot_local/share/bin/executable_wacomtouch
@@ -0,0 +1,14 @@
+#!/bin/sh
+# print if wacom tablet has touch on or off
+bye() {
+ echo $1
+ exit
+}
+
+[ ! -e /dev/input/by-id/usb-Wacom_Co._Ltd._Intuos_PTS-if01-event-mouse ] && bye
+
+if evtest --query /dev/input/by-id/usb-Wacom_Co._Ltd._Intuos_PTS-if01-event-mouse EV_SW SW_MUTE_DEVICE; then
+ bye "touch on"
+else
+ bye "touch off"
+fi