#############################
# ~ tmux.macos.conf ~ macOS specific settings for tmux
##

bind-key -T copy-mode-vi WheelUpPane send -X scroll-up
bind-key -T copy-mode-vi WheelDownPane send -X scroll-down


# NOTE: the below settings will only work within tmux >= 2.6

# Vi copy on selction
setw -g mode-keys vi
bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind-key -T copy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy" \; display-message "Copied to system clipboard"

