简体   繁体   English

Ubuntu 22.04 Xinput 设置在使用 ~/.profile 文件更改时部分更改

[英]Ubuntu 22.04 Xinput settings partially changing when change with ~/.profile file

This type of questions are all over the stackoverflow.这类问题遍布 stackoverflow。 I know it and I've searching this for almost 2 days.我知道,我已经搜索了将近 2 天。 I started to look xinput configs that needed for my trackball.我开始查看轨迹球所需的 xinput 配置。 Than I found and configured but when I restart the PC, poof nothing persist.比我发现和配置但当我重新启动 PC 时,没有任何东西存在。 So I searched for hours and hours I tried nearly 25 combination and I come up with last resort, ~/.profile file.所以我搜索了几个小时,尝试了将近 25 种组合,最后我想出了 ~/.profile 文件。 The only working solution is for me.唯一可行的解决方案适合我。 But when I added my 2 configs like below, Sensitivity works like charm and Acceleration is not doing anything.但是当我像下面这样添加我的 2 个配置时,灵敏度就像魅力一样工作,而加速没有做任何事情。 if I would mistype something the desktop crashes and it don't let me to DE.如果我输入错误,桌面就会崩溃,并且不允许我去 DE。 So I have no errors showing but also always same -0.7.. accel value.所以我没有显示错误,但也总是相同的 -0.7.. 加速度值。

id=$(xinput | sed -nE 's/.*Kensington Eagle Trackball.*id=([0-9]+).*pointer.*/\>

xinput set-prop  $id  "libinput Accel Speed" 0.9
xinput set-prop  $id "Coordinate Transformation Matrix" 0.3 0 0 0 0.3 0 0 0 1
  

Why is my code works only half I want to know and solve it.为什么我的代码只工作了一半我想知道并解决它。

Ok I figured out.好吧,我想通了。 Accel Speed is looks like same as the mouse speed under settings of ubuntu. I changed from settings and it also changed on xinput list. Accel Speed 看起来与 ubuntu 设置下的鼠标速度相同。我从设置中更改,它也在 xinput 列表中更改。 To me the command was working but settings was override it.对我来说,命令正在运行,但设置被覆盖了。 On the other hand its a real shame that there is no setting for transformation matrix.另一方面,没有转换矩阵的设置真的很遗憾。 Acceleration and mouse speed is different things and I believe it is not make sense.加速度和鼠标速度是不同的东西,我相信这是没有意义的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM