diff --git a/.conduit.yaml b/.conduit.yaml index af90a5a..1fb6b2b 100644 --- a/.conduit.yaml +++ b/.conduit.yaml @@ -2,5 +2,6 @@ - location: ~/.config/tmux - apt: - tmux + - xsel - symlink: - {src: tmux.conf, dst: ~/.tmux.conf} diff --git a/tmux.conf b/tmux.conf index b6c51c7..04694c2 100644 --- a/tmux.conf +++ b/tmux.conf @@ -65,6 +65,11 @@ bind-key u capture-pane \; split-window "tmux show-buffer | urlview -" # Enter copy mode with C-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 set-window-option -g status-left " #S"