diff --git a/tmux.conf b/tmux.conf index 0f27cfa..633450e 100644 --- a/tmux.conf +++ b/tmux.conf @@ -41,8 +41,16 @@ unbind [ bind Escape copy-mode unbind p bind p paste-buffer -bind-key -Tcopy-mode-vi 'v' send -X begin-selection -bind-key -Tcopy-mode-vi 'y' send -X copy-selection +bind-key -T copy-mode-vi 'v' send -X begin-selection +bind-key -T copy-mode-vi 'y' send -X copy-selection + +# Linux +bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "xclip -in -selection clipboard" +bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "xclip -in -selection clipboard" + +# macOS +#bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "pbcopy" +#bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "pbcopy" # Make switch session shortcut repeatable bind -r ( switch-client -p @@ -56,7 +64,7 @@ bind C-a send-prefix # Create panes bindings bind | split-window -h -bind \ split-window -h +bind \\ split-window -h bind - split-window -v # Vim bindings