@@ 7,6 7,7 @@
# set correct term
set -g default-terminal "tmux-256color"
+set -as terminal-features ',rxvt-unicode-256color:clipboard'
# set prefix key to ctrl+t
unbind C-b
@@ 24,6 25,11 @@ bind p paste-buffer
bind-key -T copy-mode-vi 'v' send-keys -X begin-selection
bind-key -T copy-mode-vi 'y' send-keys -X copy-selection
+# copy to the system clipboard
+set -s copy-command 'xsel -i'
+bind -Tcopy-mode-vi C-y send -X copy-pipe-and-cancel 'xsel -i'
+bind -Tcopy-mode-vi Enter send -X copy-pipe-and-cancel 'xsel -i'
+
# more intuitive keybindings for splitting
unbind %
bind h split-window -v