#!/bin/bash
if test -r /tmp/wacmode.dat ;
then
NYT=`cat /tmp/wacmode.dat`
if [ "$NYT" = "relative" ] ;
then
echo "absolute" > /tmp/wacmode.dat
xsetwacom set stylus mode absolute
xsetwacom set stylus xyDefault
xsetwacom set eraser mode absolute
xsetwacom set eraser xyDefault
else
echo "relative" > /tmp/wacmode.dat
xsetwacom set stylus mode relative
xsetwacom set stylus BottomX 33408
xsetwacom set eraser mode relative
xsetwacom set eraser BottomX 33408
fi
else
echo "absolute" > /tmp/wacmode.dat
xsetwacom set stylus mode absolute
xsetwacom set stylus xyDefault
xsetwacom set eraser mode absolute
xsetwacom set eraser xyDefault
fi