From 9fe2059b35337646f279261fc0572137636f5a34 Mon Sep 17 00:00:00 2001 From: Marco Date: Mon, 2 Jun 2025 11:17:45 +0200 Subject: [PATCH] fix copy for macOS and linux --- tmux/.tmux.conf | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tmux/.tmux.conf b/tmux/.tmux.conf index 2b78212..bd394f4 100644 --- a/tmux/.tmux.conf +++ b/tmux/.tmux.conf @@ -29,8 +29,13 @@ bind C-x send-prefix unbind -T copy-mode-vi v bind -T copy-mode-vi v send -X begin-selection -bind -T copy-mode-vi 'C-v' send -X rectangle-toggle -bind -T copy-mode-vi y send -X copy-pipe-and-cancel "wl-copy" +bind -T copy-mode-vi V send -X rectangle-toggle +if-shell -b '[ "$(uname)" = "Darwin" ]' \ + 'bind -T copy-mode-vi y send -X copy-pipe-and-cancel "pbcopy"' \ + 'bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy"' +if-shell -b '[ "$(uname)" = "Linux" ]' \ + 'bind -T copy-mode-vi y send -X copy-pipe-and-cancel "wl-copy"' \ + 'bind -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "wl-copy"' bind h select-pane -L bind j select-pane -D