aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xstatic_tablet_setup.sh38
-rw-r--r--workflow5
2 files changed, 43 insertions, 0 deletions
diff --git a/static_tablet_setup.sh b/static_tablet_setup.sh
new file mode 100755
index 0000000..a7442dd
--- /dev/null
+++ b/static_tablet_setup.sh
@@ -0,0 +1,38 @@
+#!/bin/bash
+# If not done yet, install the wacom library and input driver
+# xbps-install -Sy libwacom xf86-input-wacom
+#
+# To see if the tablet and pen are recognized :
+# xsetwacom list devices
+#
+# To look at the actual config of a component :
+# xsetwacom -s get "<component>" all
+# The s option can be ommitted, I use it because you need it to see button mapping.
+#
+# To look at the different paramaters you can configure :
+# xsetwacom list param
+#
+# To look at the keys you can use for the mapping process :
+# xsetwacom list modifiers
+#
+#
+# You can look at the disposition and other stuffs of you tablet on /usr/share/libwacom/<brand>-<model>.tablet
+# Exemple, for a Huion H420 :
+# cat /usr/share/libwacom/huion-h420.tablet
+# There's also a possibility to see an SVG file of the drawing at /usr/share/libwacom/layouts/<brand>-<model>.svg
+#
+#
+# Setting up the buttons
+#
+# on the tablet (pad)
+xsetwacom set "HUION H420 Pad pad" Button 1 key "ctrl" key "s" #top
+xsetwacom set "HUION H420 Pad pad" Button 2 key "ctrl" key "shift" key "z" #middle
+xsetwacom set "HUION H420 Pad pad" Button 3 key "ctrl" key "z" #bot
+
+# on the pen
+xsetwacom set "HUION H420 Pen stylus" Button 3 key "e" #button facing up (not the click button on the top)
+
+# Matching surface area to resolution of the main screen
+xsetwacom set "HUION H420 Pen stylus" MapToOutput eDP-1 #eDP-1 is the screen of the laptop, look at xrandr -q to see the one you want
+
+
diff --git a/workflow b/workflow
new file mode 100644
index 0000000..838a201
--- /dev/null
+++ b/workflow
@@ -0,0 +1,5 @@
+The script just does a static configuration of the HUION H420 upon it's calling.
+The script can also do it on a CLI.
+Buttons are customizable.
+Other options too.
+Other brands works as well.