Created
February 3, 2016 14:44
-
-
Save shieldsd/7ed7656e12066b7d2863 to your computer and use it in GitHub Desktop.
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/ksh | |
USAGE="[s:screen][screen:=middle]" | |
STYLUS=$(xsetwacom --list | grep stylus | awk '{print $8}') | |
TOUCH=$(xsetwacom --list | grep touch | awk '{print $8}') | |
ERASER=$(xsetwacom --list | grep eraser | awk '{print $8}') | |
PAD=$(xsetwacom --list | grep pad | awk '{print $8}') | |
# 3 screens 5120x1440 default is the middle one | |
WIDTH=2560 | |
HEIGHT=1440 | |
XOFFSET=2560 | |
YOFFSET=0 | |
while getopts "$USAGE" optchar | |
do | |
case $optchar in | |
s) screen=$OPTARG | |
if [[ "$screen" = "left" ]] then | |
XOFFSET=0 | |
fi | |
if [[ "$screen" = "right" ]] then | |
XOFFSET=5120 | |
fi | |
if [[ "$screen" = "all" ]] then | |
WIDTH=7680 | |
XOFFSET=0 | |
fi | |
;; | |
esac | |
done | |
xsetwacom set $PAD Button 1 2 # bottom left middle click | |
xsetwacom set $PAD Button 2 3 # top left right click | |
xsetwacom set $STYLUS MapToOutPut "${WIDTH}x${HEIGHT}+${XOFFSET}+${YOFFSET}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment