0

When I run less file.txt (for example) in a terminal, I can use the mouse wheel to scroll through file.txt.

When running less file.txt in a byobu pane, one of two things happens when I scroll with the mouse wheel:

If byobu mouse-mode is off, the entire terminal scrolls, pushing byobu itself off the screen and nothing is passed to less.

If byobu mouse-mode is on, then the pane enters scrollback mode with the [10/220] line counter in the top corner, and nothing is passed to less.

How do I configure byobu to send mouse events through to the pane in which I am scrolling?

I am using xfce4-terminal on Xubuntu 20.04.

2
  • Found solution here – pizzapants184 Aug 28 '20 at 21:59
  • This should probably be marked as a duplicate, but it won't let me since the answer is on unix.SE – pizzapants184 Aug 28 '20 at 21:59
0

Source

# Emulate scrolling by sending up and down keys if these commands are running in the pane
tmux_commands_with_legacy_scroll="nano less more man git"

bind-key -T root WheelUpPane \
    if-shell -Ft= '#{?mouse_any_flag,1,#{pane_in_mode}}' \
        'send -Mt=' \
        'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
            "send -t= Up Up Up" "copy-mode -et="'

bind-key -T root WheelDownPane \
    if-shell -Ft = '#{?pane_in_mode,1,#{mouse_any_flag}}' \
        'send -Mt=' \
        'if-shell -t= "#{?alternate_on,true,false} || echo \"#{tmux_commands_with_legacy_scroll}\" | grep -q \"#{pane_current_command}\"" \
            "send -t= Down Down Down" "send -Mt="'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.