# Renumber windows sequentially after closing any of them
set-option -g renumber-windows on
+# Keyboard
+set-window-option -g mode-keys vi
# Pass [Ctrl]+[PgUp/PgDn]
set-window-option -g xterm-keys on
+# Don't wait for [Esc] to allow fast switching from insert mode to normal in vim
+# Set (and export) environment variable SLOWTERM to override.
+if-shell "test -z $SLOWTERM" "set-option -gs escape-time 0"
# Mouse
-set-window-option -g mode-mouse on
-set-option -g mouse-select-pane on
-set-option -g mouse-resize-pane on
-# Mouse can be used to select windows (by clicking in the status bar)
-set-option -g mouse-select-window on
+#set-option -g mouse on
# Rather than constraining window size to the maximum size of any client
# connected to the *session*, constrain window size to the maximum size of any
set-window-option -g window-status-activity-style fg=yellow
set-window-option -g window-status-bell-style fg=red
-set-window-option -g window-status-content-style fg=magenta
set-window-option -g window-status-current-style bg=blue,fg=white
set-window-option -g window-status-style bg=cyan,fg=black
bind-key | split-window -h
bind-key - split-window -v
+bind-key -t vi-copy v begin-selection
+bind-key -t vi-copy y copy-selection
+bind-key -t vi-copy r rectangle-toggle
+bind P paste-buffer
+
# 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"
+bind -t vi-copy C-y copy-pipe "xclip -i"
# 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"
+bind C-p run-shell "xclip -o | tmux load-buffer -; tmux paste-buffer"