返回文章列表文章索引阅读全文
STARBLOG / 阅读手记
系统配置

Modify the mouse scroll wheel speed in the Linux system.

The default mouse wheel speed in Linux is just too slow, always giving me the illusion that Linux is laggy, and it doesn't allow direct modification of mouse wheel speed for all programs like Windows does. But no worries, you can use the tool imwheel to change it~ Installation Debian-based systems: sudo apt install imwheel Arch: sudo pacman -S imwheel Configuration Create the ~/.imwheelrc file nano ~/.imwheelrc Edit the ins

曦远 (DealiAxy)约 6 分钟
目录6 个章节

The default mouse wheel behavior in Linux is often too slow, which sometimes gives me the illusion that Linux is lagging. Unlike Windows, it doesn't allow you to directly adjust the mouse wheel speed across all applications. But don't worry—you can use a tool called imwheel to fix this!

Installation

Debian-based:

sudo apt install imwheel

Arch:

sudo pacman -S imwheel

Configuration

Create the ~/.imwheelrc file.

nano ~/.imwheelrc

Edit the content:

".*"
None,      Up,   Button4, 4
None,      Down, Button5, 4
Control_L, Up,   Control_L|Button4
Control_L, Down, Control_L|Button5
Shift_L,   Up,   Shift_L|Button4
Shift_L,   Down, Shift_L|Button5

Run

Run the test

imwheel

Run again

imwheel kill

If you see the prompt, it's successful.

Add to startup items to avoid manually running it every time you start up. You can use Gnome Tweak Tool to add this, but I recently discovered that systemd supports user-level services, and I learned the specific usage from the Arch Wiki.

Using systemd User-Level Service

Create the ~/.config/systemd/user/imwheel.service file.

Edit the content as follows:

[Unit]
Description=IMWheel
Wants=display-manager.service
After=display-manager.service

[Service]
Type=simple
Environment=XAUTHORITY=%h/.Xauthority
ExecStart=/usr/bin/imwheel -d
ExecStop=/usr/bin/pkill imwheel
RemainAfterExit=yes

[Install]
WantedBy=graphical.target

Enable the service using the following commands:

 systemctl --user daemon-reload
 systemctl --user enable --now imwheel
 journalctl --user --unit imwheel

References

Welcome to Exchange Ideas

I have compiled a series of technical articles and resources. You can reply with linux, flutter, c#, netcore, android, java, python, etc. in the background of the WeChat public account Program Design Lab to obtain related technical articles and resources. At the same time, if you have any questions, you can leave a message in the background of the public account.

_EOF_

Modify the mouse scroll wheel speed in the Linux system.

本文作者:
程序设计实验室
版权声明:
本博客所有文章除特别声明外,均采用 BY-NC-SA 许可协议。转载请注明出处!

相关文章

讨论

共 0 条

良言一句三冬暖,恶语伤人六月寒。

加载评论中…