repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

feat(wezterm): add wheel scroll bindings — 1 line, shift+wheel 5 lines

e84d67390ab3a5fc34742c5b706df505bc0c83f1

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (1)

wezterm/bugabinga/mouse_binds.lua

Modified
1 1 local wez = require 'wezterm'
3 3 local bindings = {
4 + -- Wheel: scroll 1 line per tick
5 + {
6 + event = { Down = { streak = 1, button = { WheelUp = 1 } } },
7 + mods = 'NONE',
8 + action = wez.action.ScrollByLine(-1),
9 + },
10 + {
11 + event = { Down = { streak = 1, button = { WheelDown = 1 } } },
12 + mods = 'NONE',
13 + action = wez.action.ScrollByLine(1),
14 + },
15 + -- SHIFT+Wheel: scroll 5 lines
16 + {
17 + event = { Down = { streak = 1, button = { WheelUp = 1 } } },
18 + mods = 'SHIFT',
19 + action = wez.action.ScrollByLine(-5),
20 + },
21 + {
22 + event = { Down = { streak = 1, button = { WheelDown = 1 } } },
23 + mods = 'SHIFT',
24 + action = wez.action.ScrollByLine(5),
25 + },
5 27 event = { Down = { streak = 4, button = 'Left', }, },
6 28 action = wez.action.SelectTextAtMouseCursor 'SemanticZone',