Getting the window class string

Run xprop to get the class string. The program will exit when a window is clicked.

xprop WM_CLASS | grep -o '"[^"]*"' | head -n 1

So for the document viewer zathura, this will return the following:

"zathura"

Edit your configuration file

Create or edit ~/.imwheelrc. In this configuration file lines can be added for each program you want to tweak mousewheel behavior for. The following example will increase the mousewheel speed for the document viewer zathura: