-
-
Save magynhard/079adfafba94b617d4cc35002cd49c7a to your computer and use it in GitHub Desktop.
Wacom Intuos Pro L configuration script for Krita
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/zsh | |
# This should work out of the box on debian based systems. See last comment for sysvinit specific adjustments | |
# required libs: | |
# - xsetwacom | |
# - xinput | |
# Attach tools to specific monitor (use port name e.g. "VGA1" for non NVIDIA drivers) | |
# if [[ "$WACOM_MAP_TO_OUTPUT" = "HEAD-0" ]] | |
# then | |
# xsetwacom set "Wacom Intuos Pro L Pen stylus" MapToOutput HEAD-1 | |
# xsetwacom set "Wacom Intuos Pro L Pen cursor" MapToOutput HEAD-1 | |
# xsetwacom set "Wacom Intuos Pro L Pen eraser" MapToOutput HEAD-1 | |
# WACOM_MAP_TO_OUTPUT="HEAD-1" | |
# echo "Mapping input to HEAD-1" | |
# else | |
# xsetwacom set "Wacom Intuos Pro L Pen stylus" MapToOutput HEAD-0 | |
# xsetwacom set "Wacom Intuos Pro L Pen cursor" MapToOutput HEAD-0 | |
# xsetwacom set "Wacom Intuos Pro L Pen eraser" MapToOutput HEAD-0 | |
# WACOM_MAP_TO_OUTPUT="HEAD-0" | |
# echo "Mapping input to HEAD-0" | |
# fi | |
# Check if bin dir exists in home directory and create it if its not | |
if [[ ! -d ~/bin ]]; then | |
mkdir ~/bin | |
fi | |
# Check if ~/bin/wacom-next-display exists in home directory and create it its not | |
if [[ ! -f ~/bin/wacom-next-display ]]; then | |
echo '#!/bin/bash \n\nxsetwacom set "Wacom Intuos Pro L Pen stylus" MapToOutput next \nxsetwacom set "Wacom Intuos Pro L Pen cursor" MapToOutput next \nxsetwacom set "Wacom Intuos Pro L Pen eraser" MapToOutput next \n' >> ~/bin/wacom-next-display | |
chmod +x ~/bin/wacom-next-display | |
fi | |
# ---- | |
# [IMPORTANT] Bind Ctrl+Shift+J to wacom-next-display script so that "key +ctrl +shift +j -j -shift -ctrl" would work | |
# TODO: [Automate it] | |
# For KDE: | |
# - In System Settings > Shortcuts > Custom Shortcuts > Edit > New > Global Shortcut > Command/URL | |
# |Comment| |Trigger| |Action| | |
# wacom-next-display Ctrl+Shift+J wacom-next-display | |
xsetwacom set "Wacom Intuos Pro L Pen stylus" MapToOutput HEAD-0 | |
xsetwacom set "Wacom Intuos Pro L Pen cursor" MapToOutput HEAD-0 | |
xsetwacom set "Wacom Intuos Pro L Pen eraser" MapToOutput HEAD-0 | |
# Stylus settings | |
xsetwacom set 'Wacom Intuos Pro L Pen stylus' Suppress 2 # set minimal difference between coordinates that allows | |
# to registers input | |
xsetwacom set 'Wacom Intuos Pro L Pen stylus' Button 2 "button +3 -3" # button closest to a tip: set to right click | |
xsetwacom set 'Wacom Intuos Pro L Pen stylus' Button 3 "key +ctrl +z -z -ctrl" # next button: set to Undo | |
# Express keys located on the tablet itself: from top to bottom (Button 1 is the button inside touch ring) | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 2 "key key +ctrl +shift +j -j -shift -ctrl" # Toggle between displays | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 3 "key +tab -tab" # Canvas only mode | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 3 "key +tab" # Transform tool | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 8 "key +space" # Pan canvas | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 9 "key +ctrl +space" # Relative zoom tool (use pen for smooth scrolling) | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' AbsWheelDown "key ] ]" # Increase brush size (double ] ] for increased sensitivity | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 1 "key +e -e" # Eraser mode | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' AbsWheelUp "key [ [" # Decrease brush size | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 10 "key +ctrl" # Color picker | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 11 "key +ctrl +z -z -ctrl" # Undo | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 12 "key /" # Switch between tools | |
xsetwacom set 'Wacom Intuos Pro L Pad pad' Button 13 "key +shift +del -del -shift +insert -insert " # remove current layer | |
# and immediately | |
# replace it with | |
# new one | |
# Finds xinput device responsible for touch input and disables it alltogether | |
# - remove following line if you want to keep touchpad functionality (but don't forget to configure synaptics over udev | |
# and adjust /lib/udev/rules.d/69-wacom.rules if your system uses sysvinit over systemd ) | |
xinput disable `xinput | grep Wacom\ Intuos\ Pro\ L\ Finger | awk -Fid= '{sub(/\s.*/, "", $2); print $2}'` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment