dotfiles

My collection of dotfiles
git clone git://git.noxz.tech/dotfiles
Log | Files | Refs

commit a19b2d038a54108fb16dfb091a5ccbe7137272eb
parent 650052a1c0a9463711b4cee572744344ded2b51b
Author: Chris Noxz <chris@noxz.tech>
Date:   Sun,  7 Jun 2020 11:04:52 +0200

[tmux] fix copy-and-paste to work in both tty and x

Diffstat:
Mtmux/.config/tmux/tmux.conf | 28++++++++++------------------
1 file changed, 10 insertions(+), 18 deletions(-)

diff --git a/tmux/.config/tmux/tmux.conf b/tmux/.config/tmux/tmux.conf @@ -46,17 +46,18 @@ set -g prefix M-` bind -T copy-mode-vi v send -X begin-selection bind -T copy-mode-vi C-v send -X rectangle-toggle \; \ send -X begin-selection -bind -T copy-mode-vi y send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" \; \ - send -X cancel -bind -T copy-mode-vi Enter send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" \; \ - send -X cancel +bind -T copy-mode-vi y send -X copy-pipe-and-cancel \ + 'xclip -i -sel p -f | xclip -i -sel c' +bind -T copy-mode-vi Enter send -X copy-pipe-and-cancel \ + 'xclip -i -sel p -f | xclip -i -sel c' bind -T copy-mode-vi MouseDragEnd1Pane \ - send -X copy-pipe \ - "xclip -i -sel p -f | xclip -i -sel c" \; \ - send -X cancel + send -X copy-pipe-and-cancel \ + 'xclip -i -sel p -f | xclip -i -sel c' bind -T copy-mode-vi Escape send -X cancel +bind -T prefix v run "xclip -o -sel p | tmux loadb -" \; pasteb +bind -T prefix V run "xclip -o -sel c | tmux loadb -" \; pasteb +bind -n MouseDown3Pane run "xclip -o -sel p | tmux loadb -" \; pasteb +bind -n C-MouseDown3Pane run "xclip -o -sel c | tmux loadb -" \; pasteb # split panes using | and - instead unbind -T prefix '"' @@ -74,15 +75,6 @@ bind -T root M-k select-pane -t :.- bind -T root M-J swap-pane -s :. -t :.+ \; select-pane -t :.+ bind -T root M-K swap-pane -s :. -t :.- \; select-pane -t :.- -# copy and paste -bind -T prefix v run "xclip -o -sel p | tmux loadb -bp -" \; \ - pasteb -bp -bind -T prefix V run "xclip -o -sel c | tmux loadb -bc -" \; \ - pasteb -bc -bind -n MouseDown3Pane run "xclip -o -sel p | tmux loadb -bp -" \; \ - pasteb -bp -bind -n C-MouseDown3Pane run "xclip -o -sel c | tmux loadb -bc -" \; \ - pasteb -bc # misc. key bindings unbind -T prefix c bind -T root M-z resize-pane -Z