2 if [[ -s ~
/.bashrc
]];then . ~
/.bashrc
;fi
4 # Copyright (C) 2016 Ian Kelling
6 # Licensed under the Apache License, Version 2.0 (the "License");
7 # you may not use this file except in compliance with the License.
8 # You may obtain a copy of the License at
10 # http://www.apache.org/licenses/LICENSE-2.0
12 # Unless required by applicable law or agreed to in writing, software
13 # distributed under the License is distributed on an "AS IS" BASIS,
14 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 # See the License for the specific language governing permissions and
16 # limitations under the License.
27 xinput
--get-feedbacks "$1" |
grep "threshold"
28 xinput
--get-feedbacks "$1" |
grep "accelNum\|accelDenom"
29 xinput
--list-props "$1"
32 xinput
--set-ptr-feedback "$1" $2 ${3%/*} ${3#*/}
33 # running newer system that uses libinput and has far less
34 # customizability. I havent yet determined the best settings here.
35 if xinput
--list-props "$1" |
grep "libinput Accel Speed" &>/dev
/null
; then
36 xinput
--set-prop "$1" "libinput Accel Speed" 1
38 xinput
--set-prop "$1" 'Device Accel Profile' $4
39 xinput
--set-prop "$1" 'Device Accel Constant Deceleration' $5
40 xinput
--set-prop "$1" 'Device Accel Velocity Scaling' $6
45 if [[ $2 ]] && $2; then
50 if device_id
=$
(xinput
--list |
grep "$1" |
$cmd); then
51 device_id
=${device_id##*id=}
52 device_id
=${device_id%%[[:space:]]*}
53 echo "2:$2 device_id=$device_id"
59 # default via xset q is 660 25. (delay for autorepeat, repeat rate)
60 # was at 200 13, but while learning to use keyboardio, i hold keys a bit longer sometimes.
61 xset r rate
400 13 # decrease rate delay
63 if set_device_id
"SteelSeries World of Warcraft MMO Gaming Mouse"; then
64 ms
"$device_id" 100 1000/1 7 4 1
66 # under the new "improved" libinput, the mouse speed/accel has
67 # changed all around and is much more limited.
68 # Other xinput commands will fail and this will succeed.
69 xinput
--set-prop "$device_id" "libinput Accel Speed" '.8'
72 # todo, differentiate for work pc
77 # original saved with:
78 # setxkbmap -layout us -variant intl
79 # xkbcomp $DISPLAY /a/c/etiona-2021-intl.xkb
80 xkbcomp
/a
/c
/model01.xkb
$DISPLAY
83 xkbcomp
/a
/c
/x2.xkb
$DISPLAY
88 # for desktop and htpc
89 if set_device_id
"Logitech Unifying Device"; then
90 xinput
--set-prop "$device_id" 'Evdev Middle Button Emulation' 1