3 # Copyright (C) 2016 Ian Kelling
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
17 # set to oppsite if the order is flipped.
27 treetowl
*|iank-dev|frodo
) type=kinesis
;;
39 xinput
--get-feedbacks "$1" |
grep "threshold"
40 xinput
--get-feedbacks "$1" |
grep "accelNum\|accelDenom"
41 xinput
--list-props "$1" |
grep "Device Accel Profile\|Device Accel Constant Deceleration\|Device Accel Velocity Scaling"
44 xinput
--set-ptr-feedback "$1" $2 ${3%/*} ${3#*/}
45 xinput
--set-prop "$1" 'Device Accel Profile' $4
46 xinput
--set-prop "$1" 'Device Accel Constant Deceleration' $5
47 xinput
--set-prop "$1" 'Device Accel Velocity Scaling' $6
51 if [[ $2 ]] && $2; then
56 if device_id
=$
(xinput
--list |
grep "$1" |
$cmd); then
57 device_id
=${device_id##*id=}
58 device_id
=${device_id%%[[:space:]]*}
59 echo "2:$2 device_id=$device_id"
67 # original saved with: xkbcomp $DISPLAY /a/c/stretch-11-2016.xkb
68 xkbcomp
/a
/c
/x2.xkb
$DISPLAY
69 xkbset
-m # remove mouse keys
73 # todo, differentiate for work pc
75 if [[ -z $DISPLAY ]]; then
76 echo "error. empty DISPLAY var" >> /a
/gdm-keyboard-error.log
78 xkbcomp
/a
/c
/.Xkeymap
$DISPLAY
80 xkbset m
# setup mouse keys, which I have altered
82 xkbset exp
=m
# stop mousekeys expiring after a timeout
84 xset r rate
200 13 # decrease rate delay
85 cd / # so xbindkeys does not hold open mountpoints
86 killall xbindkeys
# having some lag, thinking this might help.
87 xbindkeys
# configured to grab left and right scroll button presses
91 #right scroll wheel, change from button 4 & 5 to 13 and 14.
92 # also changes the middle click to 12, even though I'm not using it anymore
93 if set_device_id
"04d9:048e"; then
94 xinput
--set-button-map "$device_id" 1 12 3 13 14 6 7
96 kinesis2
=true
# if we are using the 2nd kinesis which has different device ids
98 if $kinesis2 && set_device_id
"USB OPTICAL MOUSE" $k2flip; then
99 xinput
--set-button-map "$device_id" 1 12 3 14 13 6 7
104 ms
'Kensington Kensington Slimblade Trackball' 100 4000/1 7 6.5 1.5
105 xinput
--set-button-map 'Kensington Kensington Slimblade Trackball' 0 0 0 4 5 6 7 0 9 10 11 12
107 # razer naga middle mouse stopped working. it's settings were:
108 #ms "$device_id" 100 1000/1 7 4 1
110 if set_device_id
"SteelSeries World of Warcraft MMO Gaming Mouse"; then
111 ms
"$device_id" 100 1000/1 7 4 1
112 #ms "$device_id" 1 7/2 2 2.5 2
114 # makes it compatible with what windows sends using synergy
115 xinput
--set-button-map "$device_id" 1 2 3 4 5 6 7 6 7 10 11 12 13 14 15
117 # under the new "improved" libinput, the mouse speed/accel has
118 # changed all around and is much more limited.
119 # Other xinput commands will fail and this will succeed.
120 xinput
--set-prop "$device_id" "libinput Accel Speed" '.8'
124 # disable the mouse movements mouse wheel
126 if set_device_id
"USB OPTICAL MOUSE" $k2inorder; then
127 xinput
--set-prop "$device_id" 'Device Accel Constant Deceleration' 10000
128 # 12 is to effectively disable the middle click button
129 xinput
--set-button-map "$device_id" 1 12 3 11 10 6 7
132 if set_device_id
"USB Optical Mouse"; then
133 xinput
--set-prop "$device_id" 'Device Accel Constant Deceleration' 10000
134 # 12 is to effectively disable the middle click button
135 xinput
--set-button-map "$device_id" 1 12 3 10 11 6 7
139 .
/a
/bin
/bash_unpublished
/duplicity-gpg-agent-setup
143 # for desktop and htpc
144 set_device_id
"Logitech Unifying Device"
145 xinput
--set-prop "$device_id" 'Evdev Middle Button Emulation' 1
148 #ms 'Kensington Kensington Slimblade Trackball' 1 7/2 2 4 5 = 2.01
149 # ms 9 10 20/1 6 4 .2
150 #ms 9 10 35/1 6 5 .2 = 1.82
151 #ms 9 10 1200/1 7 5 .2 = 1.82 after a practice round
153 #ms 9 10 140/1 6 7 .1 = 2.0 after a practice round.
154 #feels like the slow is finally too slow, and fast too fast
155 # ms 9 10 50/1 6 6 .2 = 1.83 after
156 # ms 9 10 90/1 6 6 .1 = 1.86
157 #ms 9 10 3000/1 7 6 .1 = 1.81
158 #ms 9 1 15/1 3 6 3 = 2.0
159 #ms 9 1 10/1 3 4 2 = 1.91
160 #ms 9 1 8/1 3 5 4 = 1.98
161 #ms 9 1 10/2 2 5 2.5 = 1.99
162 #ms 9 100 3000/1 7 5 1 = 1.86
163 #ms 9 100 1500/1 7 5 1.5 = 1.87
164 #ms 9 100 2200/1 7 6 1.5 = 1.81
165 #ms 9 100 2200/1 7 5 1.5 = 1.83
166 #ms 9 100 3000/1 7 6 1.5 = 1.88
167 #ms 9 1 100/1 4 6 15 = 1.85
168 #ms 9 100 3000/1 7 7 1.5 = 1.85, but had a 1.76 on first try...
169 # ms 9 100 3500/1 7 7 1.5 = 1.73, 1.68 a1 1.74, 1.83, 1.75, 1.78, 1.76
170 # ms 9 100 4000/1 7 7 1.5 = 1.80
171 # ms 9 100 4000/1 7 8 1.5 = 1.78
172 # ms 9 100 4000/1 7 8 1.8 = 1.88
173 # ms 9 100 4800/1 7 8 1.5 = 1.85
174 # ms 9 100 4000/1 7 6.5 1.5 = 1.83. stickig with this, upped speeds a bit to make it more practical for normal windows
176 # ms 9 100 3500/1 7 7 1.5 = 1.92
177 # ms 9 1 7/2 2 5 5 = 1.9
178 # ms 9 100 3500/1 7 7 1.5 = 1.62
179 # felt like having it a bit faster for a while, but switched back
180 #ms 'Kensington Kensington Slimblade Trackball' 100 3500/1 7 5 1.5