#!/bin/bash

DIR=`dirname $0`
. $DIR/config

#
# commands
#

# activate customer display
xrandr --output $CUSTOMER_DISPLAY --off
xrandr --output $CUSTOMER_DISPLAY --auto --right-of $MAIN_DISPLAY
xrandr --output $MAIN_DISPLAY --mode ${MAIN_DISPLAY_W}x${MAIN_DISPLAY_H} --pos 0x0 --rotate normal

# transform touch coordinates
if [ "$TOUCH_SCALE_FACTOR" != "" ]; then
  xinput set-prop $TOUCH_ID --type=float "Coordinate Transformation Matrix" $TOUCH_SCALE_FACTOR 0.000000 0.000000 0.000000 1 0.000000 0.000000 0.000000 1.000000
fi

