tmux has an additional command :save-buffer filename
I haven't seen the examples you referenced piping tmux show-buffer
to xclip
. I have used a mapping change to do something similar with :save-buffer /dev/clipboard
.
Integrate :save-buffer /dev/clipboard
with your copy-selection mapping. My tmux.conf contains the following line:
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection \; save-buffer /dev/clipboard \; send-keys -X cancel # Yank selection in copy mode, copy to windows clipboard, cancel copy mode
I'll guess you want something similar to that but pertaining to your mouse selection (which I'm unfamiliar with). Like this?
bind-key -T copy-mode MouseDragEnd1Pane send-keys -X copy-selection \; save-buffer /dev/clipboard \; send-keys -X cancel
Reference you may enjoy: OpenBSD tmux man page. Their man pages are generally very complete.
Buffer utilization: http://man.openbsd.org/OpenBSD-current/man1/tmux.1#BUFFERS
Search the page also for "send-keys" for info.