# Increase scrollback lines
set-option -g history-limit 1000
+# Set the command prefix to match GNU screen (CTRL+a)
+# set-option -g prefix C-a
+#
+# Use C-a C-a key to send prefix instead of the default
+# unbind-key C-b
+# bind-key C-a send-prefix
+#
+# <prefix> C-a for last-window
+# bind-key C-a last-window
+
# <prefix> R to reload config without restart
bind-key R source-file ~/.tmux.conf \; display "Reloaded!"
bind K resize-pane -U 10
bind L resize-pane -R 10
-# Set the command prefix to match GNU screen (CTRL+a)
-# set-option -g prefix C-a
-#
-# Use C-a C-a key to send prefix instead of the default
-# unbind-key C-b
-# bind-key C-a send-prefix
-#
-# <prefix> C-a for last-window
-# bind-key C-a last-window
+bind -r C-h select-window -t :-
+bind -r C-l select-window -t :+
# Use vertical and horizontal chars to split the screen
bind-key | split-window -h
bind-key - split-window -v
+
+# Copy tmux copy buffer to X clipboard
+# bind C-y run-shell "tmux save-buffer - | xclip -i"
+bind -t emacs-copy C-p copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b"
+bind -t vi-copy C-p copy-pipe "xsel -i -p && xsel -o -p | xsel -i -b"
+# Copy X clipboard to tmux paste buffer
+# bind C-p run-shell "xclip -o | tmux load-buffer -; tmux paste-buffer"
+bind C-y run-shell "xsel -o | tmux load-buffer - ; tmux paste-buffer"