forked from HedgeInSmog/wacom-profile-switcher
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Krita
executable file
·86 lines (71 loc) · 4.12 KB
/
Krita
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
86
## 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.
#reset ring
#rm /tmp/mode_state
#./krita-ring.sh
#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" "Using Krita 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 "12" # 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 "5 10 90 95"
#xsetwacom set "$DEVICE_STYLUS" PressureCurve "5 10 65 95"
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" Touch "off" # "off"
## setting to draw by button
xsetwacom set "$DEVICE_STYLUS" Button 1 "1" # draw
xsetwacom set "$DEVICE_STYLUS" Button 2 "3" # palette - bottom button
xsetwacom set "$DEVICE_STYLUS" Button 3 "2" # pan - upper button
#default
#xsetwacom set "$DEVICE_STYLUS" Button 2 "2" # palette - upper button
#xsetwacom set "$DEVICE_STYLUS" Button 3 "3" # pan - bottom button
## 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" PressureCurve "0 0 100 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 h" #latest colors
xsetwacom set "$DEVICE_PEN_PAD" Button 3 "key shift" #size
xsetwacom set "$DEVICE_PEN_PAD" Button 8 "key ctrl" #color pick
xsetwacom set "$DEVICE_PEN_PAD" AbsWheelDown key K
xsetwacom set "$DEVICE_PEN_PAD" Button 1 "key ctrl alt super 3" # button inside touchring - script
xsetwacom set "$DEVICE_PEN_PAD" AbsWheelUp key L
xsetwacom set "$DEVICE_PEN_PAD" Button 9 "key e" #eraser mode
xsetwacom set "$DEVICE_PEN_PAD" Button 10 "key d" #multibrushes
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"
./krita-ring.sh