Write scripts for setting up wacom tablet and maptool
This commit is contained in:
30
.local/bin/initwacom
Executable file
30
.local/bin/initwacom
Executable file
@@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
for i in $(seq 10); do
|
||||
if xsetwacom list devices | grep -q Wacom; then
|
||||
break
|
||||
fi
|
||||
sleep 1
|
||||
done
|
||||
|
||||
list=$(xsetwacom list devices)
|
||||
pad=$(echo "${list}" | awk '/pad/{print $8}')
|
||||
stylus=$(echo "${list}" | awk '/stylus/{print $8}')
|
||||
eraser=$(echo "${list}" | awk '/eraser/{print $8}')
|
||||
|
||||
if [ -z "${pad}" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
xsetwacom set "${stylus}" MapToOutput DisplayPort-1
|
||||
xsetwacom set "${eraser}" MapToOutput DisplayPort-1
|
||||
|
||||
xsetwacom set "${stylus}" Area "0 0 31496 17716"
|
||||
xsetwacom set "${eraser}" Area "0 0 31496 17716"
|
||||
|
||||
xsetwacom set "${pad}" Button 11 "key +ctrl z -ctrl"
|
||||
xsetwacom set "${pad}" Button 10 "key +shift"
|
||||
xsetwacom set "${pad}" Button 9 "key +ctrl"
|
||||
xsetwacom set "${pad}" Button 1 "button +15"
|
||||
#xsetwacom set "${pad}" Button 4 "key 0xffad"
|
||||
#xsetwacom set "${pad}" Button 4 "button +5"
|
||||
Reference in New Issue
Block a user