#!/bin/bash
#
# /etc/hotplug/usb/logitech_mouse
#
# Sets up higher resolution for the mouse

# wait for the mouse
sleep 1

. /etc/sysconfig/logitech_mouse

options=

if [ -n "$LOGITECH_MOUSE_RESOLUTION" ]; then
	options="--set-res=$LOGITECH_MOUSE_RESOLUTION"
fi

if [ -z "$LOGITECH_MOUSE_DISABLE_CC" -o "$LOGITECH_MOUSE_DISABLE_CC" = yes ]; then
	options="$options --disable-cc"
fi

# has USB device been added or removed
case $ACTION in
	add)
		if [ -n "$options" ]; then
			/usr/bin/logitech_applet $options
		fi
	;;
	remove)
	;;

esac
