#!/bin/bash
. ./lib

if ( confirm "Saitek Cyborg R.A.T.3 patch for xorg. This correct the stop working mouse bug after start X session.\n\nCreate /usr/share/X11/xorg.conf.d/50-saitekrat3.conf ?" ) then
cat << EOF > /usr/share/X11/xorg.conf.d/50-saitekrat3.conf
Section "InputClass"
  Identifier "Saitek Cyborg R.A.T.3"
  MatchProduct "Saitek Cyborg R.A.T.3 Mouse"
  MatchDevicePath "/dev/input/event*"
  Option "ButtonMapping" "1 2 3 4 5 0 0 8 9 0 0 0 13 14"
EndSection
EOF
fi

exit 0