3
# This script is an example hotplug script for use with the various
4
# input devices plugins.
6
# The script is called with the arguments:
7
# -t [added|present|removed] <device name>
8
# added ... device was just plugged in
9
# present.. device was present at gnome-settings-daemon startup
10
# removed.. device was just removed
12
# device ID being the XInput device ID
13
# <device name> The name of the device
15
# The script should return 0 if the device is to be
16
# ignored from future configuration.
18
# Set the script to be used with:
19
# gsettings set org.gnome.settings-daemon.peripherals.input-devices hotplug-command /path/to/script/input-devices.sh
22
args=`getopt "t:i:" $*`
43
echo "Unknown option $1";
54
echo "Device '$device' (ID=$id) was added"
57
echo "Device '$device' (ID=$id) was already present at startup"
60
echo "Device '$device' (ID=$id) was removed"
63
echo "Unknown operation"
68
# All further processing will be disabled if $retval == 1