Last active
September 26, 2020 23:49
-
-
Save nlamprian/15dc2b283e6378e00ef3 to your computer and use it in GitHub Desktop.
Configures Wacom Intuos3 tablet on Linux
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
#!/usr/bin/sh | |
# Wacom Intuos3 6x8 pad | |
# _________________________________________________________________________ | |
# | | | |
# | ___ ___ ___ ___________________________________ ___ ___ ___ | | |
# | | | | | | | | | | | | | |
# | | | 1 | 4 | | 0 - Button 3 | | 6 | 8 | | | | |
# | | 0 |___| + | | 1 - Button 1 | | + |___| A | | | |
# | | | | | | | 2 - Button 2 | | | | | | | | |
# | | | 2 | + | | 3 - Button 8 | | + | 9 | | | | |
# | |___|___| 5 | | 4 - StripLeftUp | | 7 |___|___| | | |
# | | 3 | | | 5 - StripLeftDown | | | B | | | |
# | |_______|___| | 6 - StripRightUp | |___|_______| | | |
# | | 7 - StripRightDown | | | |
# | | 8 - Button 9 | | | |
# | | 9 - Button 10 | | | |
# | | A - Button 11 | | | |
# | | B - Button 12 | | | |
# | | | | | |
# | |___________________________________| | | |
# | | | |
# | WACOM | | |
# | | | |
# | | | |
# |_________________________________________________________________________| | |
# | |
# | |
# Wacom Intuos3 6x8 stylus | |
# ________ ___ | |
# __---------------------------------------/ 3 \/ 2 \--------\__ | |
# |`` _ > 1 | |
# ``--------------------------------------------------------------/ | |
# | |
# More info: | |
# http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Tablet_Configuration | |
# http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Wacom_Tablet_Configuration | |
# | |
# | |
# ## Set the script to auto-start in each session: | |
# | |
# # Place the script in ~/bin/.xsetwacom.sh | |
# # and make it executable: chmod +x ~/bin/.xsetwacom.sh | |
# | |
# # Go to you distribution's settings manager, find the section for the startup applications, | |
# # and add an entry for the following command "/home/<your-username>/bin/.xsetwacom.sh" | |
# # For Xubuntu, it's: Applications menu -> Settings -> Settings Manager -> | |
# # Session and Startup -> Application Autostart Tab -> Add -> | |
# # Name: xsetwacom config -> Command: /home/<your-username>/bin/.xsetwacom.sh | |
DEVICE="Wacom Intuos3 6x8" | |
STYLUS="$DEVICE Pen stylus" | |
ERASER="$DEVICE Pen eraser" | |
CURSOR="$DEVICE Pen cursor" | |
PAD="$DEVICE Pad pad" | |
FAILURE="1" | |
for i in $(seq 20); do | |
if xsetwacom --list devices | grep "$DEVICE" > /dev/null; then | |
FAILURE="0" | |
break | |
else | |
echo "Waiting for device $DEVICE" | |
sleep 1 | |
fi | |
done | |
if [ "$FAILURE" -eq 1 ]; then | |
exit 1 | |
fi | |
# Wacom Intuos3 6x8 stylus | |
# The values set correspond to numbers on the X11 Mouse Button Numbering Scheme | |
# More: http://xahlee.info/linux/linux_x11_mouse_button_number.html | |
xsetwacom set "$STYLUS" Button 1 1 # Left Click | |
xsetwacom set "$STYLUS" Button 2 3 # Right Click | |
xsetwacom set "$STYLUS" Button 3 "button 1 button 1" # Left Double Click | |
# Wacom Intuos3 6x8 pad | |
xsetwacom set "$PAD" Button 1 "key +ctrl x -ctrl" # Cut | |
xsetwacom set "$PAD" Button 2 "key +ctrl c -ctrl" # Copy | |
xsetwacom set "$PAD" Button 3 "key +ctrl z -ctrl" # Undo | |
xsetwacom set "$PAD" Button 8 "key +ctrl v -ctrl" # Paste | |
xsetwacom set "$PAD" Button 9 "key +ctrl w -ctrl" # Close Tab | |
xsetwacom set "$PAD" Button 10 "key +ctrl tab -ctrl" # Change Tab | |
xsetwacom set "$PAD" Button 11 "key +alt f4 -alt" # Close Window | |
xsetwacom set "$PAD" Button 12 "key alt tab" # Change Window | |
echo "Device $DEVICE has been configured" |
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
#!/usr/bin/sh | |
# Wacom Intuos BT S pad | |
# ___________________________________________ | |
# | _____________________________________ | | |
# | / | | | | \ | | |
# | | 0 | 1 | | 2 | 3 | | | |
# | \_______|________|____|_______|_______/ | | |
# | ___________________________________ | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | | 0 - Button 1 | | | |
# | | 1 - Button 2 | | | |
# | | 2 - Button 3 | | | |
# | | 3 - Button 8 | | | |
# | | | | | |
# | | | | | |
# | | | | | |
# | |___________________________________| | | |
# | | | |
# |___________________________________________| | |
# | |
# | |
# Wacom Intuos BT S stylus | |
# ________ ___ | |
# ---------------------------------------/ 1 \/ 2 \--------\__ | |
# | _ > 3 | |
# --------------------------------------------------------------/ | |
# | |
# More info: | |
# http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Tablet_Configuration | |
# http://sourceforge.net/apps/mediawiki/linuxwacom/index.php?title=Wacom_Tablet_Configuration | |
# | |
# | |
# ## Set the script to auto-start in each session: | |
# | |
# # Place the script in ~/bin/.xsetwacom.sh | |
# # and make it executable: chmod +x ~/bin/.xsetwacom.sh | |
# | |
# # Go to you distribution's settings manager, find the section for the startup applications, | |
# # and add an entry for the following command "/home/<your-username>/bin/.xsetwacom.sh" | |
# # For Xubuntu, it's: Applications menu -> Settings -> Settings Manager -> | |
# # Session and Startup -> Application Autostart Tab -> Add -> | |
# # Name: xsetwacom config -> Command: /home/<your-username>/bin/.xsetwacom.sh | |
DEVICE="Wacom Intuos BT S" | |
STYLUS="$DEVICE Pen stylus" | |
ERASER="$DEVICE Pen eraser" | |
CURSOR="$DEVICE Pen cursor" | |
PAD="$DEVICE Pad pad" | |
FAILURE="1" | |
for i in $(seq 20); do | |
if xsetwacom --list devices | grep "$DEVICE" > /dev/null; then | |
FAILURE="0" | |
break | |
else | |
echo "Waiting for device $DEVICE" | |
sleep 1 | |
fi | |
done | |
if [ "$FAILURE" -eq 1 ]; then | |
exit 1 | |
fi | |
# Wacom Intuos BT S stylus | |
# The values set correspond to numbers on the X11 Mouse Button Numbering Scheme | |
# More: http://xahlee.info/linux/linux_x11_mouse_button_number.html | |
xsetwacom set "$STYLUS" Button 1 1 # Left Click | |
xsetwacom set "$STYLUS" Button 2 3 # Right Click | |
xsetwacom set "$STYLUS" Button 3 "button 1 button 1" # Left Double Click | |
# Wacom Intuos BT S pad | |
# xsetwacom set "$PAD" Button 1 "key +ctrl x -ctrl" # Cut | |
# xsetwacom set "$PAD" Button 2 "key +ctrl c -ctrl" # Copy | |
# xsetwacom set "$PAD" Button 3 "key +ctrl z -ctrl" # Undo | |
# xsetwacom set "$PAD" Button 8 "key +ctrl v -ctrl" # Paste | |
xsetwacom set "$PAD" Button 1 "key +alt f4 -alt" # Close Window | |
xsetwacom set "$PAD" Button 2 "key alt tab" # Change Window | |
xsetwacom set "$PAD" Button 3 "key +ctrl w -ctrl" # Close Tab | |
xsetwacom set "$PAD" Button 8 "key +ctrl tab -ctrl" # Change Tab | |
echo "Device $DEVICE has been configured" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment