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.
35 xinput
--get-feedbacks "$1" |
grep "threshold"
36 xinput
--get-feedbacks "$1" |
grep "accelNum\|accelDenom"
37 xinput
--list-props "$1" |
grep "Device Accel Profile\|Device Accel Constant Deceleration\|Device Accel Velocity Scaling"
40 xinput
--set-ptr-feedback "$1" $2 ${3%/*} ${3#*/}
41 xinput
--set-prop "$1" 'Device Accel Profile' $4
42 xinput
--set-prop "$1" 'Device Accel Constant Deceleration' $5
43 xinput
--set-prop "$1" 'Device Accel Velocity Scaling' $6
47 if [[ $2 ]] && $2; then
52 if device_id
=$
(xinput
--list |
grep "$1" |
$cmd); then
53 device_id
=${device_id##*id=}
54 device_id
=${device_id%%[[:space:]]*}
55 echo "2:$2 device_id=$device_id"
61 # default via xset q is 660 25. (delay for autorepeat, repeat rate)
62 # was at 200 13, but while learning to use keyboardio, i hold keys a bit longer sometimes.
63 xset r rate
400 13 # decrease rate delay
65 if set_device_id
"SteelSeries World of Warcraft MMO Gaming Mouse"; then
66 ms
"$device_id" 100 1000/1 7 4 1
68 # under the new "improved" libinput, the mouse speed/accel has
69 # changed all around and is much more limited.
70 # Other xinput commands will fail and this will succeed.
71 xinput
--set-prop "$device_id" "libinput Accel Speed" '.8'
74 # todo, differentiate for work pc
79 # original saved with: xkbcomp $DISPLAY /a/c/flidas-2017-12.xkb
80 xkbcomp
/a
/c
/model01.xkb
$DISPLAY
81 .
/a
/bin
/bash_unpublished
/duplicity-gpg-agent-setup
84 xkbcomp
/a
/c
/x2.xkb
$DISPLAY
89 # for desktop and htpc
90 if set_device_id
"Logitech Unifying Device"; then
91 xinput
--set-prop "$device_id" 'Evdev Middle Button Emulation' 1