From 20b389bc45f560924df817751035e334de2a87c5 Mon Sep 17 00:00:00 2001 From: Raphael Betschart Date: Fri, 25 Sep 2026 12:02:42 +0200 Subject: [PATCH] Add ability to detect screen without touch or styles in the name --- haoskiosk/run.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/haoskiosk/run.sh b/haoskiosk/run.sh index da38135..b520c18 100755 --- a/haoskiosk/run.sh +++ b/haoskiosk/run.sh @@ -488,11 +488,12 @@ done if [ "$MAP_TOUCH_INPUTS" = true ]; then #Map touch devices to physical output while IFS= read -r id; do #Loop through all xinput devices name=$(xinput list --name-only "$id" 2>/dev/null) - [[ "${name,,}" =~ (^|[^[:alnum:]_])(touch|touchscreen|stylus)([^[:alnum:]_]|$) ]] || continue #Not touch-like input xinput_line=$(xinput list "$id" 2>/dev/null) [[ "$xinput_line" =~ \[(slave|master)[[:space:]]+keyboard[[:space:]]+\([0-9]+\)\] ]] && continue props="$(xinput list-props "$id" 2>/dev/null)" [[ "$props" = *"Coordinate Transformation Matrix"* ]] || continue #No transformation matrix + [[ "${name,,}" =~ (^|[^[:alnum:]_])(touch|touchscreen|stylus)([^[:alnum:]_]|$) || + "$props" = *"libinput Calibration Matrix"* ]] || continue #Not touch-like input xinput map-to-output "$id" "$OUTPUT_NAME" && RESULT="SUCCESS" || RESULT="FAILED" bashio::log.info "Mapping: input device [$id|$name] --> $OUTPUT_NAME [$RESULT]"