Ani*_*ich 6 touchpad mouse linux-mint scrolling
鼠标滚动性能在 Linux 中很差,并且没有内置的方法来控制它。因此,我做了一些挖掘并遇到了IMWheel
. 我按照本教程如何在 Linux 中调整或增加鼠标滚轮速度并将我的鼠标滚动速度设置为 5。
这似乎修复了我的物理鼠标滚动速度。然而,使用我的笔记本电脑的触摸板滚动并不是完美的。页面似乎表现不正常,每次滚动一定量的页面时都会跳转,非常不愉快。禁用 IMWheel 后,触摸板行为似乎恢复正常。
有没有什么方法可以让物理鼠标获得不错的滚动速度,同时保持 Linux 中触摸板的现有滚动体验?就像它在 Windows 中一样?如果有,请指导我如何解决这个问题。
这个问题确实让我根本无法使用 Linux!
以下是我当前的鼠标和触摸板设置:
硬件和软件详情:
小智 0
我们可以执行以下操作,以在插入鼠标时启动 imwheel,并在拔出鼠标时停止。
我使用的是 Fedora 33,但类似的解决方案应该适用于其他发行版。
此方法假设您的计算机上正在运行 imwheel 服务。
$HOME/xinputwatcher.sh(记住 chmod +x 这个文件)
#!/bin/bash
while true
do
if [[ $(xinput list --name-only | grep 'Logitech USB-PS/2 Optical Mouse') ]];
then
if [[ $(systemctl --user is-active imwheel) == inactive ]];
then
systemctl --user start --now imwheel
echo "starting imwheel"
else
echo "imwheel already running"
fi
else
if [[ $(systemctl --user is-active imwheel) == active ]];
then
systemctl --user stop --now imwheel
echo "stopping imwheel"
else
echo "imwheel already stopped"
fi
fi
sleep 3
done
Run Code Online (Sandbox Code Playgroud)
xinput
以获取设备列表)。elseif
块。sleep
命令;如果我们拔掉鼠标,它应该会在 3 秒内生效。./xinputwatcher.sh
。当您插入鼠标时,它应该启动 imwheel,当您拔下鼠标时,它应该停止 imwheel。现在创建在系统启动时自动运行该脚本的服务。
$HOME/.config/systemd/user/xinputwatcher.service
[Unit]
Description=xinputwatcher
[Service]
Type=simple
ExecStart=$HOME/xinputwatcher.sh
KillMode=process
[Install]
WantedBy=graphical-session.target
Run Code Online (Sandbox Code Playgroud)
最后,启用该服务,以便它在重新启动时自动启动。
systemctl --user daemon-reload
systemctl --user enable xinputwatcher.service
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
1020 次 |
最近记录: |