When I tried using tmux to get a similar effect the main problem I had was that if I tried to select text with the mouse it didn’t understand my panes. And I couldn’t figure out how to get it to do focus-follows-mouse between the panes
This works in Ubuntu 20.04:
# selection
## Source: https://www.rockyourcode.com/copy-and-paste-in-tmux/
set-option -g mouse on ## key line
set-option -s set-clipboard off
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel ‘xclip -se c -i’
## Bonus: Pasting, vim bindings
bind P paste-buffer
bind-key -T copy-mode-vi v send-keys -X begin-selection
unbind -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel ‘xclip -se c -i’
bind-key -T copy-mode-vi ‘y’ send-keys -X copy-pipe-and-cancel ‘xclip -se c -i’
From the place I got it:
The above commands use xclip, a Linux command line tool for X11. You can replace xclip -se c -i with a platform-specific command like pbcopy (MacOS) or wl-copy (Wayland).
More generally, here is my .tmux.conf, in which copying with the mouse works, as does copying and pasting.
This works in Ubuntu 20.04:
From the place I got it:
More generally, here is my .tmux.conf, in which copying with the mouse works, as does copying and pasting.
Before I dig into this, does this also include focus following the mouse between panes?
Only if you click
Thanks! I was confused because you also quoted my “I couldn’t figure out how to get it to do focus-follows-mouse between the panes” bit