9 xorg mouse-scroll mouse-wheel
是否可以根据在顶部(聚焦)上运行的应用程序具有不同的鼠标滚轮滚动速度。
就像 guake 的较慢滚动速度以便于阅读和更高的 Web 浏览器滚动速度。
以下脚本dynamic_mouse_speed.py
允许指定当用户定义的窗口具有焦点时鼠标指针和/或滚动速度应该是什么。
重要提示:脚本需要imwheel
程序来提高滚动速度。请通过安装sudo apt-get install imwheel
如-h
flag所示:
usage: dynamic_mouse_speed.py [-h] [-q] [-p POINTER] [-s SCROLL] [-v]
Sets mouse pointer and scroll speed per window
optional arguments:
-h, --help show this help message and exit
-q, --quiet Blocks GUI dialogs.
-p POINTER, --pointer POINTER
mouse pointer speed,floating point number from -1 to 1
-s SCROLL, --scroll SCROLL
mouse scroll speed,integer value , -10 to 10
recommended
-v, --verbose prints debugging information on command line
Run Code Online (Sandbox Code Playgroud)
该脚本允许用户通过单击鼠标来选择他们想要跟踪的窗口。鼠标指针会变成十字,用户可以选择他们想要的窗口。
python3 dynamic_mouse_speed.py
单独运行只显示弹出对话框,它本身什么也不做。
运行会python3 dynamic_mouse_speed.py -s 5
增加滚动速度,同时python3 dynamic_mouse_speed.py -s -5
减慢滚动速度。python3 dynamic_mouse_speed.py -p -0.9
降低指针速度,同时python3 dynamic_mouse_speed.py -p 0.9
增加指针速度。-s
和-p
选项可以混合。-v
在命令行上生成调试信息。
也可作为GitHub 要点
usage: dynamic_mouse_speed.py [-h] [-q] [-p POINTER] [-s SCROLL] [-v]
Sets mouse pointer and scroll speed per window
optional arguments:
-h, --help show this help message and exit
-q, --quiet Blocks GUI dialogs.
-p POINTER, --pointer POINTER
mouse pointer speed,floating point number from -1 to 1
-s SCROLL, --scroll SCROLL
mouse scroll speed,integer value , -10 to 10
recommended
-v, --verbose prints debugging information on command line
Run Code Online (Sandbox Code Playgroud)
Gtk-Message: GtkDialog mapped without a transient parent. This is discouraged.
这些可以忽略。Evdev Scrolling Distance
属性的第一个设备上运行