Skip to content

Smooth scrolling

Terminals move content a whole character at a time, so panning a map jumps by a cell. As an experiment, mapterm can move the map by single pixels on terminals that support an experimental smooth-scroll protocol. Today that is only Ghostty Smooth, a personal fork of Ghostty (see its SMOOTH.md). The herdr fork relays it from herdr panes.

It’s off unless you set an environment variable:

Setting Effect
MAPTERM_SMOOTH=shift Dragging follows the pointer pixel by pixel; scrolling still zooms
MAPTERM_SMOOTH=1 Two-finger up/down pans the map smoothly instead of zooming
Terminal window
MAPTERM_SMOOTH=shift mapterm

With either set, s toggles smooth scrolling while mapterm runs. Terminals without the protocol ignore it and behave as usual.

The video at the top of the home page was made this way: mapterm in Ghostty Smooth with MAPTERM_SMOOTH=shift, the map dragged pixel by pixel along the Potomac from Key Bridge to the Tidal Basin, and recorded from the window. In other terminals the same drag moves the map a whole cell at a time.