diff --git a/_config/tmux/tmux.conf b/_config/tmux/tmux.conf index 5991582..cb66d86 100644 --- a/_config/tmux/tmux.conf +++ b/_config/tmux/tmux.conf @@ -14,6 +14,14 @@ set -g default-terminal "tmux-256color" set -g mouse on bind-key -T prefix m set -g mouse\; display 'Mouse: #{?mouse,ON,OFF}' +# Copy to system clipboard +if-shell "uname | grep -q Darwin" \ + 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "pbcopy"' \ + 'bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"' +if-shell "uname | grep -q Darwin" \ + 'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy"' \ + 'bind -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -selection clipboard"' + # Highlight pane with activity setw -g monitor-activity on