2015-05-29 21:08:06 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
cd $(dirname $0)
|
|
|
|
|
|
|
|
INTERN="LVDS1"
|
|
|
|
IDS=$(./wacomdevices.sh)
|
|
|
|
|
2015-10-24 02:10:31 +02:00
|
|
|
set_monitor_rotation() {
|
|
|
|
rotation=${1:-normal}
|
|
|
|
xrandr --output $INTERN --rotate $rotation
|
|
|
|
}
|
2015-05-29 21:08:06 +02:00
|
|
|
|
2015-10-24 02:10:31 +02:00
|
|
|
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
|
|
|
|
}
|
2015-05-29 21:08:06 +02:00
|
|
|
|
2015-10-24 02:10:31 +02:00
|
|
|
if [ "$1" == "on" ]; then
|
|
|
|
set_monitor_rotation inverted
|
|
|
|
set_tablet_rotation half
|
|
|
|
set_tablet_output $INTERN
|
|
|
|
else
|
|
|
|
set_monitor_rotation normal
|
|
|
|
set_tablet_rotation none
|
2015-05-29 21:08:06 +02:00
|
|
|
fi
|