File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -84,21 +84,21 @@ duration () {
8484log () { printf ' %s %s\n' " $( date +%F' ' %T) " " $@ " ; }
8585
8686# SCRIPT
87- xinput list| grep Mouse| while read device; do
88- log " Device=$device "
89- eval $( echo $device | grep -Eo ' id=[0-9]{2}' )
87+ xinput list| awk -F ' id=' ' /MX Anywhere|Mouse/ {print $2}' | awk ' {print $1}' | while read id; do
9088 device_name=" $( xinput list --name-only $id ) "
89+ log " Device=$device_name "
9190 natural_scroll_option_status=$( xinput --list-props $id | awk ' /Natural Scrolling Enabled \(/ {print $6}' )
9291 log " ID=$id , name=$device_name and Natural scrolling status=$natural_scroll_option_status "
93- xinput set-int-prop " $device_name " " libinput Natural Scrolling Enabled" 8 1
94- xinput list-props " $device_name " | grep " Natural Scrolling Enabled ("
92+ xinput set-int-prop $id " libinput Natural Scrolling Enabled" 8 1
93+ xinput list-props $id | grep " Natural Scrolling Enabled ("
9594
9695 # When "Logitech USB Laser Mouse" is present:
9796 if [[ " $device_name " == " Logitech USB Laser Mouse" ]]; then
9897 log " Increase speed of $device_name ."
99- xinput set-prop " $device_name " " Coordinate Transformation Matrix" 2 0 0 0 2 0 0 0 1
100- xinput list-props " $device_name " | grep " Coordinate Transformation Matrix"
98+ xinput set-prop $id " Coordinate Transformation Matrix" 2 0 0 0 2 0 0 0 1
99+ xinput list-props $id | grep " Coordinate Transformation Matrix"
101100 fi
101+ echo
102102done
103103
104104
You can’t perform that action at this time.
0 commit comments