#!/bin/sh
# sddm DisplayCommand for the mithra greeter: give the greeter's X the same
# touchscreen handling mithra-session gives the session X (attach to the core
# pointer). Runs as root, DISPLAY set.
(
    for _ in $(seq 1 30); do
        if xinput list --name-only 2>/dev/null | grep -qx touchscreen; then
            xinput reattach touchscreen "Virtual core pointer" 2>/dev/null
            break
        fi
        sleep 1
    done
) &
