home

How To Increase Scroll Wheel Speed In Linux

This guide will detail how to install, configure and autostart imwheel.

Installing

  1. Install imwheel from your systems package manager. I use Fedora so I will use dnf.

    sudo dnf install imwheel
  2. Open imwheel's config file in a text editor of your choice. I will use nano.

    nano ~/.imwheelrc
  3. Paste in the following config (Use ctrl+shift+v to paste into the terminal)

    ".*"
    None, Up, Button4, 2
    None, Down, Button5, 2
    Shift_L,   Up,   Shift_L|Button4, 2
    Shift_L,   Down, Shift_L|Button5, 2
    Control_L, Up,   Control_L|Button4
    Control_L, Down, Control_L|Button5
  4. Save the file. (in nano: ctrl+x, y, enter)

  5. Run imwheel, passing in -k to kill any previously open instances.

    imwheel -k

imwheel works by repeating the scroll event multiple times. You may want to change the times-repeated to your liking, see the advanced configuration section.

Running on startup

  1. Create a new file in ~/.config/autostart called imwheel.desktop
    nano ~/.config/autostart/imwheel.desktop
  2. Paste in the following:
    [Desktop Entry]
    Version=1.0
    Type=Application
    Terminal=false
    Exec=/usr/bin/imwheel
    Name=imwheel
  3. Save the file. (in nano: ctrl+x, y, enter)

Advanced Configuration

The config uses the format below

modifier, output-button, input-button, times-repeated

This is an example of a config that doubles the scroll speed, with no modifier key:

".*"
    None, Up, Button4, 2
    None, Down, Button5, 2

This one doubles the scroll unless the left control key (modifier key) is being held:

".*"
    None, Up, Button4, 2
    None, Down, Button5, 2
    Control_L, Up,   Control_L|Button4
    Control_L, Down, Control_L|Button5

Enable on a per app basis

The ".*" means this will apply to all apps. If you want to specify an app use the format "^APPNAME$". See the example below

"^discord$"
    None, Up, Button4, 2
    None, Down, Button5, 2
    Shift_L,   Up,   Shift_L|Button4, 2
    Shift_L,   Down, Shift_L|Button5, 2
    Control_L, Up,   Control_L|Button4
    Control_L, Down, Control_L|Button5
"^Spotify$"
    None, Up, Button4, 2
    None, Down, Button5, 2
    Shift_L,   Up,   Shift_L|Button4, 2
    Shift_L,   Down, Shift_L|Button5, 2
    Control_L, Up,   Control_L|Button4
    Control_L, Down, Control_L|Button5
"^brave-browser$"
    None, Up, Button4, 2
    None, Down, Button5, 2
    Shift_L,   Up,   Shift_L|Button4, 2
    Shift_L,   Down, Shift_L|Button5, 2
    Control_L, Up,   Control_L|Button4
    Control_L, Down, Control_L|Button5

To find an app's name, open another terminal and run the following command.

imwheel -c

Click the black box, then click the app you want to view.

I used the "class" of each window but the resource and title should work too.

29-08-2023 22:17