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.
26 some_x200_laptop
) type=laptop
;;
27 hosts_with_keyboards_attached
) type=kinesis
;;
40 xinput
--get-feedbacks "$1" |
grep "threshold"
41 xinput
--get-feedbacks "$1" |
grep "accelNum\|accelDenom"
42 xinput
--list-props "$1" |
grep "Device Accel Profile\|Device Accel Constant Deceleration\|Device Accel Velocity Scaling"
45 xinput
--set-ptr-feedback "$1" $2 ${3%/*} ${3#*/}
46 xinput
--set-prop "$1" 'Device Accel Profile' $4
47 xinput
--set-prop "$1" 'Device Accel Constant Deceleration' $5
48 xinput
--set-prop "$1" 'Device Accel Velocity Scaling' $6
52 if [[ $2 ]] && $2; then
57 if device_id
=$
(xinput
--list |
grep "$1" |
$cmd); then
58 device_id
=${device_id##*id=}
59 device_id
=${device_id%%[[:space:]]*}
60 echo "2:$2 device_id=$device_id"
66 # default via xset q is 660 25. (delay for autorepeat, repeat rate)
67 # was at 200 13, but while learning to use keyboardio, i hold keys a bit longer sometimes.
68 xset r rate
400 13 # decrease rate delay
70 if set_device_id
"SteelSeries World of Warcraft MMO Gaming Mouse"; then
71 ms
"$device_id" 100 1000/1 7 4 1
73 # under the new "improved" libinput, the mouse speed/accel has
74 # changed all around and is much more limited.
75 # Other xinput commands will fail and this will succeed.
76 xinput
--set-prop "$device_id" "libinput Accel Speed" '.8'
79 # todo, differentiate for work pc
84 xkbcomp
/a
/c
/model01.xkb
$DISPLAY
85 .
/a
/bin
/bash_unpublished
/duplicity-gpg-agent-setup
88 # original saved with: xkbcomp $DISPLAY /a/c/stretch-11-2016.xkb
89 xkbcomp
/a
/c
/x2.xkb
$DISPLAY
94 # for desktop and htpc
95 if set_device_id
"Logitech Unifying Device"; then
96 xinput
--set-prop "$device_id" 'Evdev Middle Button Emulation' 1