#!/bin/bash
# 99999-mouse-fallback.sh
# ultimate fallback

XORG_CONF="$1"

[ -n "$XORG_CONF" ] || exit 2
[ -f "$XORG_CONF" ] || exit 2

logger -t retrodebian-xorg-autoconfig "Configuring ultimate Mouse fallback"

sed -i \
    -e "s|{InputDeviceDriver}|mouse|g" \
    -e "s|{InputDeviceDevice}|/dev/input/mice|g" \
    -e "s|{InputDeviceProtocol}|auto|g" \
    "$XORG_CONF" || exit 2

exit 0