forked from HedgeInSmog/wacom-profile-switcher
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Inkscape
executable file
·71 lines (60 loc) · 3.58 KB
/
Inkscape
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
## 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 "Wacom" "Inkscape 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 "10" # 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 - vutton pen click
xsetwacom set "$DEVICE_STYLUS" Button 2 "3" # left mouse click - touch pen - action
xsetwacom set "$DEVICE_STYLUS" Button 3 "2" # middle mouse click
## eraser = ID 9 = "$DEVICE_ERASER "
xsetwacom set "$DEVICE_ERASER" Suppress "4" # 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_PAD"
xsetwacom set "$DEVICE_PEN_PAD" Button 2 "key f1"
xsetwacom set "$DEVICE_PEN_PAD" Button 3 "key f2"
xsetwacom set "$DEVICE_PEN_PAD" Button 8 "key f9"
xsetwacom set "$DEVICE_PEN_PAD" AbsWheelDown 4
xsetwacom set "$DEVICE_PEN_PAD" Button 1 "key ctrl alt super 4"
xsetwacom set "$DEVICE_PEN_PAD" AbsWheelUp 5
xsetwacom set "$DEVICE_PEN_PAD" Button 9 "key esc" #esc
xsetwacom set "$DEVICE_PEN_PAD" Button 10 "key return" #confirm
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"
./inkscape-ring.sh