forked from HedgeInSmog/wacom-profile-switcher
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Default
executable file
·85 lines (69 loc) · 4.17 KB
/
Default
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
## Device names and ID numbers from 'xinput list' entered in a terminal.
#
## In the example "Device name" not ID # is used. Note if you use the
## xorg.conf the "Device names" will be stylus, eraser, touch, and pad.
#
## If you are hot plugging use "Device name" as ID # can change.
#
## ClickForce changes name to Threshold with xf86-input-wacom 0.10.9 (11-19-10)
#
## Warning: Changing Mode to either Absolute or Relative in stylus/eraser stops
## the mouse from being able to pull guidelines out of the ruler in Gimp.
#Calculate devices names
DEVICE_STYLUS=`xsetwacom list dev | grep -E -o ".*stylus"`
DEVICE_ERASER=`xsetwacom list dev | grep -E -o ".*eraser"`
DEVICE_CURSOR=`xsetwacom list dev | grep -E -o ".*cursor"`
DEVICE_PEN_PAD=`xsetwacom list dev | grep -E -o ".*Pad pad"`
DEVICE_FINGER_PAD=`xsetwacom list dev | grep -E -o ".*Finger pad"`
DEVICE_TOUCH=`xsetwacom list dev | grep -E -o ".*touch"`
#notify user about used profile
notify-send --hint int:transient:1 "Wacom" "Default profile"
#screen region where Stylus will work
#for 2 screens: MapToOutput 3286x1080+0+0
xsetwacom set "$DEVICE_STYLUS" MapToOutput 1920x1200+0+0
## stylus = ID 12 = "Wacom Intuos4 6x9 stylus"
xsetwacom set "$DEVICE_STYLUS" TabletPCButton "off" # stylus tip + button, or "off" for hover mode
xsetwacom set "$DEVICE_STYLUS" Mode "Absolute" # or Relative cursor movement
xsetwacom set "$DEVICE_STYLUS" Suppress "4" # data pt.s trimmed, default is 4, 0-20
xsetwacom set "$DEVICE_STYLUS" RawSample "2" # data pt.s filtered, default is 2, 0-100
#xsetwacom set "$DEVICE_STYLUS" ClickForce "27" # pressure, default is 27, range is 0-2047
xsetwacom set "$DEVICE_STYLUS" Threshold "27" # pressure, default is 27, range is 0-2047
xsetwacom set "$DEVICE_STYLUS" PressureCurve "0 0 100 100" # Bezier curve, default is 0,0,100,100
#xsetwacom set "$DEVICE_STYLUS" PressureCurve "0 15 85 100"
#xsetwacom set "$DEVICE_STYLUS" PressureCurve "0 100 0 100" # ridiculously soft
#xsetwacom set "$DEVICE_STYLUS" PressureCurve "0 50 50 100" # very soft
#xsetwacom set "$DEVICE_STYLUS" PressureCurve "50 0 100 50" # very firm
#xsetwacom set "$DEVICE_STYLUS" PressureCurve "100 0 100 0" # unbelievably firm
xsetwacom set "$DEVICE_STYLUS" Button 1 "1" # right mouse click
xsetwacom set "$DEVICE_STYLUS" Button 2 "3" # middle mouse click
xsetwacom set "$DEVICE_STYLUS" Button 3 "2" # middle mouse click
## eraser = ID 9 = "$DEVICE_ERASER "
xsetwacom set "$DEVICE_ERASER" Suppress "20" # data pt.s trimmed, default is 4, 0-20
xsetwacom set "$DEVICE_ERASER" RawSample "2" # data pt.s filtered, default is 2, 0-100
#xsetwacom set "$DEVICE_ERASER " ClickForce "27" # pressure, default is 27, range is 0-2047
xsetwacom set "$DEVICE_ERASER" Threshold "27" # pressure, default is 27, range is 0-2047
xsetwacom set "$DEVICE_ERASER" PressureCurve "0 10 90 100" # Bezier curve, default is 0,0,100,100
xsetwacom set "$DEVICE_ERASER" Mode "Absolute" # or Relative cursor movement
xsetwacom set "$DEVICE_ERASER" Button 1 "1"
## pad = ID 11 = "$DEVICE_PEN_PAD"
xsetwacom set "$DEVICE_PEN_PAD" Button 2 "key esc"
xsetwacom set "$DEVICE_PEN_PAD" Button 3 "key shift"
xsetwacom set "$DEVICE_PEN_PAD" Button 8 "key ctrl"
xsetwacom set "$DEVICE_PEN_PAD" AbsWheelDown 4
xsetwacom set "$DEVICE_PEN_PAD" Button 1 "1"
xsetwacom set "$DEVICE_PEN_PAD" AbsWheelUp 5
xsetwacom set "$DEVICE_PEN_PAD" Button 9 "key ctrl alt m" #mc
xsetwacom set "$DEVICE_PEN_PAD" Button 10 "key super r" #terminal
xsetwacom set "$DEVICE_PEN_PAD" Button 11 "key ctrl z" #undo
xsetwacom set "$DEVICE_PEN_PAD" ScrollDistance "10"
xsetwacom set "$DEVICE_PEN_PAD" TapTime "50"
xsetwacom set "$DEVICE_TOUCH" "Area" "0 0 4096 4096"
xsetwacom set "$DEVICE_TOUCH" "Mode" "Relative"
xsetwacom set "$DEVICE_TOUCH" "Gesture" "on"
xsetwacom set "$DEVICE_TOUCH" "ZoomDistance" "180" #def 180
xsetwacom set "$DEVICE_TOUCH" "ScrollDistance" "80" #def 80
xsetwacom set "$DEVICE_TOUCH" "TapTime" "250"
#xsetwacom set "$DEVICE_TOUCH" "SpeedLevel" "5"
xinput set-prop "$DEVICE_TOUCH" --type=float "Device Accel Constant Deceleration" 1.250000
xinput set-prop "$DEVICE_TOUCH" --type=float "Device Accel Adaptive Deceleration" 1.150000
xinput set-prop "$DEVICE_TOUCH" --type=float "Device Accel Velocity Scaling" 10.000000