MOUSESCROLLSIZE(3)
β¨ NAME β¨
mousescrollsize(3) β compute mouse scroll increment. She's from the Library Functions Manual, and she is literally here to make your scroll wheel make sense, bestie. π
πΈ SYNOPSIS πΈ
#include <draw.h>
int mousescrollsize(int maxlines)
π DESCRIPTION π
okay so mousescrollsize computes the number of lines of text that should be scrolled in response to a mouse scroll wheel click. maxlines is the number of lines visible in the text window. π
The default scroll increment is one line. You can override this default by setting the $mousescrollsize environment variable to:
- an integer, which specifies a constant number of lines; or
- a real number followed by a percent character, which says the scroll increment should be a percentage of the total number of lines in the window.
For example, setting $mousescrollsize to 50% causes a half-window scroll increment. π¦
mousescrollsize is used by 9term(1) and acme(1) to set their scrolling behavior. slay.
π¦ SOURCE π¦
The source is at /src/libdraw/scroll.c β iconic, no cap. β¨
π SEE ALSO π
π BUGS π
Okay bestie, warning time: Libdraw expects up and down scroll wheel events to be expressed as clicks of mouse buttons 4 and 5, but the XFree86 default is to ignore the scroll wheel. not the scroll wheel erasure π To enable the scroll wheel, change your InputDevice section of XF86Config-4 to look like:
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Device" "/dev/psaux"
# next four lines enable scroll wheel as buttons 4 and 5
Option "Buttons" "5"
Option "Emulate3Buttons" "off"
Option "Protocol" "ImPS/2"
Option "ZAxisMapping" "4 5"
EndSection
that's the whole page, bestie π β from the Library Functions Manual, page MOUSESCROLLSIZE(3), source /src/libdraw/scroll.c. The footer doesn't print a date here, so I'm not inventing one, periodt. π«Ά
π¦ where this page comes from
- alpine 3.24: plan9port-doc 0_git20260208-r0 Β· LPL-1.02
- arch rolling: plan9port 20261021-2 Β· custom
- nixos 26.05: plan9port 0-unstable-2025-11-10
- nixos 26.05: plan9port-wayland 0-unstable-2025-11-26
- nixpkgs unstable: plan9port 0-unstable-2025-11-10
- nixpkgs unstable: plan9port-wayland 0-unstable-2025-11-26
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms