Created
November 25, 2012 19:00
-
-
Save alkavan/4144805 to your computer and use it in GitHub Desktop.
script for setting mouse sensitivity to human speed on fedora 17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# if you need to set mouse sensitivity on X or gnome3 to value lower than the | |
# mouse configuration utility provides, this is the script for you. | |
# script built for fedora 17, but it should work for some other distros as well. | |
echo -e "\ncheck the 'id' of you mouse device ...\n" | |
xinput | |
echo "---- ---- ---- ----" | |
echo -e "if have two device, run again with decond id" | |
echo -e -n "pointer device id: " | |
read device_id | |
echo -e -n "constant deceleration (1.5~): " | |
read s1 | |
echo -e -n "velocity scaling (1~): " | |
read s2 | |
echo -e "\ndevice: $device_id cd: $s1 vs: $s2" | |
echo -n "confirm [y/n]: " | |
read confirm | |
if [ $confirm != "y" ] ; then | |
exit 0 | |
fi | |
echo "setting device ..." | |
eval "xinput --set-prop $device_id \"Device Accel Constant Deceleration\" $s1" | |
echo -e "xinput --set-prop $device_id \"Device Accel Constant Deceleration\" $s1" | |
eval "xinput --set-prop $device_id \"Device Accel Velocity Scaling\" $s2" | |
echo -e "xinput --set-prop $device_id \"Device Accel Velocity Scaling\" $s2" | |
echo "done!" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment