diff --git a/tmux.conf b/tmux.conf index 17e88c4..a3fc485 100755 --- a/tmux.conf +++ b/tmux.conf @@ -84,5 +84,10 @@ set -g pane-active-border-style fg=green,bg=default setw -g mode-keys vi # Update default binding of `Enter` to also use copy-pipe unbind -T copy-mode-vi Enter -bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c" -bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" +if-shell '[[ $(uname -s) = Linux ]]' { + bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -selection c" + bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" +} { + bind-key -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy" + bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "pbcopy" +}