-
Notifications
You must be signed in to change notification settings - Fork 0
/
xppen.sh
executable file
·47 lines (41 loc) · 1.98 KB
/
xppen.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/usr/bin/env bash
# Setup UGTABLET Artist Pro 16 (Gen2)
# License: CC-0/Public-Domain license
# author: deevad
# --------------------------------------
# XP-Pen Artist Pro 16 (Gen2)
# --------------------------------------
# Tablet definition
# Identifier obtained using the 'xsetwacom --list' command line
# The tablet appears after installation of the Digimend kernel driver (10 or more)
# And after creating a special rule for Xorg.
# See blog post on https://www.davidrevoy.com/index.php?tag/hardware for it.
tabletstylus="UGTABLET Artist Pro 16 (Gen2) stylus"
tableteraser="UGTABLET Artist Pro 16 (Gen2) eraser"
# Constrain stylus to use it's own monitor
# Monitor name here (output) is "HDMI-A-0". It was obtained
# using the 'xrandr' command-line. Your might
# be different.
# In nvidia you have to use HEAD-whatever at the moment
output="HEAD-1"
xsetwacom --set "$tabletstylus" MapToOutput $output
xsetwacom --set "$tableteraser" MapToOutput $output
# Calibration
# Start by reseting calibration to default area
xsetwacom --set "$tabletstylus" ResetArea
# Default area is '0 0 32767 32767'
# You can obtain it with:
# xsetwacom --get "$tabletstylus" Area
# Calibrate your device manually with `xinput_calibrator` after connecting only the Xpen-Pen pro-art
# (Area is "MinX" "MinY" "MaxX" "MaxY"), then tweak manually adding or rmoving +50 here and there to obtain
# Something pleasing I found:
xsetwacom set "$tabletstylus" Area 125 45 32810 32792
xsetwacom set "$tableteraser" Area 125 45 32810 32792
# Pressure Curve:
# a web GUI is available here to tweak it https://linuxwacom.github.io/bezier.html
xsetwacom --set "$tabletstylus" PressureCurve 90 85 15 100
# Configuration data trimming and suppression
# The event of this device are not legion; better to not filter any for sensitivity
# Minimal trimming is also good.
xsetwacom --set "$tabletstylus" Suppress 0 # data pt.s filtered, default is 2, 0-100 (old 4)
xsetwacom --set "$tabletstylus" RawSample 1 # data pt.s trimmed, default is 4, 1-20 (old 1)