#!/bin/bash

TOUCHPANEL=(
# Radxa Display 8HD
goodix-ts
"pointer:Goodix Capacitive TouchScreen"
"keyboard:Goodix Capacitive TouchScreen"
# Raspberry Pi Touch Display
fts_ts
)

# Map touch panel to DSI
for i in "${TOUCHPANEL[@]}"
do
    if xinput --list --name-only "$i"
    then
        xinput --map-to-output "$i" DSI-1
    fi
done

# Run original setup script (if any)
exec "$@"
