tmux: No mouse by default, but shortcuts
[shutils.git] / dotfiles / tmux / .tmux.conf
index 9bfe9b12fcd32be06b47bc0ffc9f45b4377ffb0f..5306fffe006554f89789eaaeadde4f2c2d92565a 100644 (file)
@@ -1,8 +1,16 @@
-set -g default-terminal "screen-256color"
-set -g mouse on
+# Prefer xterm-256color as vim (neovim) within mutt switches to monochrome with
+# screen-256color.
+set -g default-terminal "xterm-256color"
+#set -g mouse on
 
 set-window-option -g xterm-keys on
 
+# Copy to X11 clipboard
+bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
+
+bind-key m set-option -g mouse on \; display 'Mouse: ON'
+bind-key M set-option -g mouse off \; display 'Mouse: OFF'
+
 
 # {{{{ Gruvbox color scheme
 # https://github.com/egel/tmux-gruvbox/blob/master/tmux-gruvbox-dark.conf