Cleanup tabletmode

This commit is contained in:
madmaurice 2015-10-24 02:10:31 +02:00
parent da69610ea5
commit b7b431038f

View file

@ -5,14 +5,26 @@ cd $(dirname $0)
INTERN="LVDS1" INTERN="LVDS1"
IDS=$(./wacomdevices.sh) IDS=$(./wacomdevices.sh)
set_monitor_rotation() {
rotation=${1:-normal}
xrandr --output $INTERN --rotate $rotation
}
set_tablet_rotation() {
rotation=${1:-none}
for i in $IDS; do xsetwacom set $i Rotate $rotation; done
}
set_tablet_output() {
output=${1:-LVDS1}
for i in $IDS; do xsetwacom set $i MapToOutput $output; done
}
if [ "$1" == "on" ]; then if [ "$1" == "on" ]; then
#xrandr --output $INTERN --rotate left set_monitor_rotation inverted
xrandr --output $INTERN --rotate inverted set_tablet_rotation half
set_tablet_output $INTERN
for i in $IDS; do xsetwacom set $i Rotate half; done
else else
#xrandr --output $INTERN --rotate left set_monitor_rotation normal
xrandr --output $INTERN --rotate normal set_tablet_rotation none
for i in $IDS; do xsetwacom set $i Rotate none; done
fi fi