Ubuntu 20.04 鼠标滚轮速度 Ubuntu 20.04 鼠标滚轮速度

2025-06-08

Ubuntu 20.04 鼠标滚轮速度

Ubuntu 20.04 鼠标滚轮速度

Ubuntu 20.04 鼠标滚轮速度


我的滚动速度非常慢,直到我发现

安装并运行

  1. 您必须使用以下命令安装 imwhell:

    
    
    sudo apt install imwheel
    

2. And download this bash script on [http://www.nicknorton.net](http://www.nicknorton.net/mousewheel.sh) (thanks to him)
You can type, as @victoor say in comments :
>You can just do ` bash <(curl -s http://www.nicknorton.net/mousewheel.sh) ` instead of copy the script manually and changing permissions. :) 
    ```


#!/bin/bash
# Version 0.1 Tuesday, 07 May 2013
# Comments and complaints http://www.nicknorton.net
# GUI for mouse wheel speed using imwheel in Gnome
# imwheel needs to be installed for this script to work
# sudo apt-get install imwheel
# Pretty much hard wired to only use a mouse with
# left, right and wheel in the middle.
# If you have a mouse with complications or special needs,
# use the command xev to find what your wheel does.
#
### see if imwheel config exists, if not create it ###
if [ ! -f ~/.imwheelrc ]
then
cat >~/.imwheelrc<<EOF
".*"
None,      Up,   Button4, 1
None,      Down, Button5, 1
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5
EOF
fi
##########################################################
CURRENT_VALUE=$(awk -F 'Button4,' '{print $2}' ~/.imwheelrc)
NEW_VALUE=$(zenity --scale --window-icon=info --ok-label=Apply --title="Wheelies" --text "Mouse wheel speed:" --min-value=1 --max-value=100 --value="$CURRENT_VALUE" --step 1)
if [ "$NEW_VALUE" == "" ];
then exit 0
fi
sed -i "s/\($TARGET_KEY *Button4, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button4, and write new value.
sed -i "s/\($TARGET_KEY *Button5, *\).*/\1$NEW_VALUE/" ~/.imwheelrc # find the string Button5, and write new value.
cat ~/.imwheelrc
imwheel -kill


Enter fullscreen mode Exit fullscreen mode
  1. 然后将 .sh 文件设置为可执行文件:```

chmod +x mousewheel.sh

4. And then run script with :
    ```


./mousewheel.sh


Enter fullscreen mode Exit fullscreen mode
  1. 并通过单击“应用”按钮在弹出窗口中设置鼠标滚轮速度。(我的设置是 7)重新运行脚本进行更改。

  2. 最后在 ubuntu 启动应用程序中添加 imwheel。

如果您对上一个和下一个鼠标按钮有疑难解答:

  • 添加-b "4 5"到 imwhell :


imwheel -b "4 5"


Enter fullscreen mode Exit fullscreen mode

您可以在此处找到有关通过应用程序设置速度的其他详细信息:

或者在手册页中:man imwheel

图片:Pexels

抱歉,这是我的第一篇帖子。
祝您有愉快的一天!

鏂囩珷鏉ユ簮锛�https://dev.to/bbavouzet/ubuntu-20-04-mouse-scroll-wheel-speed-536o
PREV
React Hooks 数据处理第一部分 - 获取数据
NEXT
哇!Next.js 继续令人印象深刻