commit eb693bb0b1d2193e2cff1e6f5a46694ffb729133 Author: Spencer Killen Date: Tue Jan 26 21:07:38 2021 -0700 initial diff --git a/config.bash b/config.bash new file mode 100755 index 0000000..9ce99ca --- /dev/null +++ b/config.bash @@ -0,0 +1,32 @@ +#!/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` + +xsetwacom --set "$PAD_NAME" Button 1 "key +ctrl +z -z -ctrl" +xsetwacom --set "$PAD_NAME" Button 2 "key e" +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 x" +xsetwacom --set "$PAD_NAME" Button 11 "key y" +xsetwacom --set "$PAD_NAME" Button 12 "key z" + +# Fix the monitors for mouse and stylus +xinput map-to-output $ID_STYLUS $MONITOR +xinput map-to-output $ID_MOUSE $MONITOR_MAIN