Add tmux-yank binding for Linux

This commit is contained in:
Kenneth Benzie 2018-06-08 19:52:34 +01:00
parent a6b8580ef0
commit 529a65c06b
2 changed files with 6 additions and 0 deletions

View File

@ -2,5 +2,6 @@
- location: ~/.config/tmux - location: ~/.config/tmux
- apt: - apt:
- tmux - tmux
- xsel
- symlink: - symlink:
- {src: tmux.conf, dst: ~/.tmux.conf} - {src: tmux.conf, dst: ~/.tmux.conf}

View File

@ -65,6 +65,11 @@ bind-key u capture-pane \; split-window "tmux show-buffer | urlview -"
# Enter copy mode with C-U # Enter copy mode with C-U
bind-key C-u copy-mode -u bind-key C-u copy-mode -u
# Begin selection in copy mode with v not Space
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Yank to the system clipboard in copy mode
if -b '[ "`uname`" = "Linux" ]' \
"bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xsel -i -p && xsel -o -p | xsel -i -b'"
# Left status style # Left status style
set-window-option -g status-left " #S" set-window-option -g status-left " #S"