[tmux] copy to clipboard separated for linux and mac
This commit is contained in:
@@ -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"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user