You are not logged in.
Pages: 1
I can scroll with the mouse wheel in xterm when I use standard command output and whatnot, but I can't figure out how to scroll through man pages with the scroll wheel. Thoughts?
Last edited by MarCustomized (2008-11-06 03:43:58)
Offline
Use mcview.
Or maybe most? It's got more features, I dunno if scroll wheel is one of them.
Here's an mcview script, it needs mc of course
#! /bin/bash
for program in $(whereis $1); do [[ $program =~ .*man/.* ]] && mcview $program; done
Offline
I just spent 20 minutes digging in the manuals for urxvt and lesskey because I realized I'd also like something like this. The bad news it, it isn't going to (easily) happen without patching less (or simply using another pager; most and mcview are good). The rest of this post is technical detail you probably don't need unless you're more persistent than I am.
Xterm-compatible terminals don't send mouse events by default. That can be worked around by sending the appropriate control sequences ('\e[?9h' and '\e[?9l') before and after (respectively) running less. A quick shell function could automate this. The larger problem is that there's no way to get just the button pressed: it also sends the coordinates of the pointer at the time of the click. You can tell less to scroll based on events by entering the appropriate sequences in your ~/.lesskey file and running lesskey (see `man lesskey`). As these sequences include the coordinates, you would need to have a line for every permutation. Without poking around the source I don't even know if less can handle that many bindings.
Offline
Pages: 1