36 lines
1.2 KiB
Bash
Executable File
36 lines
1.2 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
# Sources:
|
|
# Drivers and config help
|
|
# https://github.com/DIGImend/digimend-kernel-drivers#configuring-wacom-xorg-driver
|
|
# Reddit Kamvas 13 user
|
|
# https://www.reddit.com/r/huion/comments/hiz1u6/my_experience_with_the_kamvas_13_2020_on_linux/
|
|
# SO post with boostrap code
|
|
# https://askubuntu.com/questions/839161/limit-a-graphics-tablet-to-one-monitor
|
|
|
|
|
|
#Change DVI-I-1 to what monitor you want from running command: xrandr
|
|
MONITOR="DP-1"
|
|
MONITOR_MAIN="HDMI-0" # Get with xrandr
|
|
PAD_NAME="Tablet Monitor Pad pad"
|
|
ID_MOUSE=`xinput | grep "G305.*pointer" | cut -f 2 | cut -c 4-5`
|
|
ID_STYLUS=`xinput | grep "stylus" | cut -f 2 | cut -c 4-5`
|
|
|
|
# Uses The pi menu addon for blender
|
|
|
|
|
|
|
|
xsetwacom --set "$PAD_NAME" Button 1 "key +ctrl +z -z -ctrl"
|
|
xsetwacom --set "$PAD_NAME" Button 2 "key +alt +q -alt -q"
|
|
xsetwacom --set "$PAD_NAME" Button 3 "key f"
|
|
|
|
xsetwacom --set "$PAD_NAME" Button 8 "key shift"
|
|
xsetwacom --set "$PAD_NAME" Button 9 "key ctrl"
|
|
|
|
xsetwacom --set "$PAD_NAME" Button 10 "key +ctrl +tab -ctrl -tab"
|
|
xsetwacom --set "$PAD_NAME" Button 11 "key +alt +space -alt -space"
|
|
xsetwacom --set "$PAD_NAME" Button 12 "key +ctrl +shift +z -z -shift -ctrl"
|
|
|
|
# Fix the monitors for mouse and stylus
|
|
xinput map-to-output $ID_STYLUS $MONITOR
|