diff --git a/wezterm/.config/wezterm/wezterm.lua b/wezterm/.config/wezterm/wezterm.lua index 23138e2..e986a1c 100644 --- a/wezterm/.config/wezterm/wezterm.lua +++ b/wezterm/.config/wezterm/wezterm.lua @@ -63,6 +63,27 @@ config.keys = { }, } +-- Mouse: tame scrollback wheel scrolling. +-- This only affects the MAIN screen / scrollback (e.g. `pi`, which does not +-- enable mouse reporting or the alternate screen, so the wheel falls through to +-- wezterm's native scrollback - which gets amplified into page jumps with +-- Wayland high-resolution wheels). Alt-screen apps that capture the mouse +-- (nvim, less, etc.) are unaffected: they go through +-- `alternate_buffer_wheel_scroll_speed` instead. Lower the line count for finer +-- steps, raise it for faster scrolling. +config.mouse_bindings = { + { + event = { Down = { streak = 1, button = { WheelUp = 1 } } }, + mods = 'NONE', + action = wezterm.action.ScrollByLine(-3), + }, + { + event = { Down = { streak = 1, button = { WheelDown = 1 } } }, + mods = 'NONE', + action = wezterm.action.ScrollByLine(3), + }, +} + -- Machine-local overrides (not tracked in dotfiles) -- Create ~/.config/wezterm/local.lua returning a function that mutates config local ok, local_config = pcall(require, 'local')