Bontiv-Sourceer source code viewer
Root | Help
./screen_rotate
#! /bin/bash

devices=`xsetwacom --list devices | grep STYLUS | cut -f 2 | cut -f 2 -d ' '`
touchs=`xinput --list | grep Touchscreen | cut -f 2 | cut -f 2 -d '='`

if [ "$1" = "normal" ]; then
    for device in $devices; do
        xsetwacom --set $device Rotate none
    done
    xrandr -o normal
    for device in $touchs; do
        xinput set-prop $device 297 0 0
    done
elif [ "$1" = "half" ]; then
    for device in $devices; do
        xsetwacom --set $device Rotate half
    done
    xrandr -o inverted
    for device in $touchs; do
        xinput set-prop $device 297 1 1
    done
elif [ "$1" = "touchoff" ]; then
    for device in $touchs; do
        xinput set-prop $device 148 0
    done
elif [ "$1" = "touchon" ]; then
    for device in $touchs; do
        xinput set-prop $device 148 1
    done
else
    echo "USAGE $0 { half | normal | touchoff | touchon }"
fi
Presented with Bontiv-Sourceer