Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tmux 'set-option -g mouse on' does not work when ssh to remote linux machine on Windows10 #920

Open
TieZhu-Liu opened this issue Jan 24, 2025 · 0 comments

Comments

@TieZhu-Liu
Copy link

TieZhu-Liu commented Jan 24, 2025

When I use tmux to select different windows with the mouse, Rio terminal does not work and scrolling back also has issue

Image

Windows Version

OS Name: Microsoft Windows 10 Enterprise LTSC
OS Version: 10.0.17763 N/A Build 17763

Linux Version

NAME="Rocky Linux"
VERSION="9.5 (Blue Onyx)"
ID="rocky"
ID_LIKE="rhel centos fedora"
VERSION_ID="9.5"
PLATFORM_ID="platform:el9"

Tmux Version

tmux 3.5a

Tmux Conf

# Reload .tmux.conf
bind r source-file ~/.tmux.conf \; display-message "Config reloaded.."

# $SHELL
set-option -g default-command "/usr/bin/zsh"
# C-b is not acceptable -- Vim uses it
unbind-key C-b
set-option -g prefix 'C-\'
bind-key 'C-\' last-window

set -g history-limit 200000

set-option -g mouse on

# color
set -g default-terminal "screen-256color"
set-option -ga terminal-overrides ",screen-256color:Tc"

# Allows for faster key repetition
set-option -s escape-time 0

# For nvim autoread
set-option -g focus-events on

# Start numbering at 1
set-option -g base-index 1
set-option -g pane-base-index 1

# prevent long window name
set-option -g allow-rename off

# status line
set-option -g status-position top
set-option -g status-interval 10

# bind keys
bind-key c new-window -c '#{pane_current_path}'
#bind-key v split-window -hb -c '#{pane_current_path}'

# synchronize panes toggle for simultanously applying the same command in multiple panes
bind-key C-s set-window-option synchronize-panes

# 1.8
bind-key -r -T prefix w choose-window -Nw
bind-key -r -T prefix s choose-session -Nw

# use vim-like keys for splits and windows
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R

# system clipboard Linux

# vi-style copying
set-option -w -g mode-keys vi

# These bindings are for X Windows only. If you're using a different
# window system you have to replace the `xsel` commands with something
# else. See https://github.com/tmux/tmux/wiki/Clipboard#available-tools
bind-key -T copy-mode    DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind-key -T copy-mode-vi DoubleClick1Pane select-pane \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"
bind-key -n DoubleClick1Pane select-pane \; copy-mode -M \; send -X select-word \; send -X copy-pipe-no-clear "xsel -i"

#bind-key -T copy-mode    TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
#bind-key -T copy-mode-vi TripleClick1Pane select-pane \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
#bind-key -n TripleClick1Pane select-pane \; copy-mode -M \; send -X select-line \; send -X copy-pipe-no-clear "xsel -i"
bind-key -n MouseDown2Pane run "tmux set-buffer -b primary_selection \"$(xsel -o)\"; tmux paste-buffer -b primary_selection; tmux delete-buffer -b primary_selection"

bind-key -T copy-mode    C-c send -X copy-pipe-no-clear "xsel -i --clipboard"

bind-key -T copy-mode-vi 'v' send -X begin-selection
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel "xsel -i --clipboard"

# List of plugins
set -g @plugin 'tmux-plugins/tpm'
#set -g @plugin 'tmux-plugins/tmux-sensible'

# Theme
set -g @plugin 'dracula/tmux'
set -g @dracula-plugins "cpu-usage ram-usage"
set -g @dracula-show-powerline true

# For clipboard
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @yank_action 'copy-pipe'


# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
set-environment -g TMUX_PLUGIN_MANAGER_PATH '~/.config/tmux/plugins'
run '~/.config/tmux/plugins/tpm/tpm'

RIO conf

[fonts]
size = 18
family = "Sarasa Fixed SC Nerd Font"

[navigation]
mode = "plain"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant