aboutsummaryrefslogtreecommitdiffstats
path: root/.config/tmux/macos.tmux
blob: 2e1a18bbd7b5efa44318dadb19843c839d5d6121 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
# Related: [issue #67](https://github.com/tmux-plugins/tpm/issues/67)
set-environment -g PATH "/opt/homebrew/bin:/bin:/usr/bin"

set-option -g default-command "reattach-to-user-namespace -l $SHELL"

# Prefix C-c copy buffer to system clipboard
bind C-c run "tmux save-buffer - | reattach-to-user-namespace pbcopy"

# Prefix C-v paste system clipboard into tmux
bind C-v run "tmux set-buffer \"$(reattach-to-user-namespace pbpaste)\"; tmux paste-buffer"

bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"