tmux: Update config
[shutils.git] / dotfiles / tmux / .tmux.conf
index 9bfe9b12fcd32be06b47bc0ffc9f45b4377ffb0f..69d58a3f57ae6d9f699e82069a0ea38b97b851de 100644 (file)
@@ -1,8 +1,23 @@
-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
 
+# Pass escape immediately to vim
+set -sg escape-time 0
+
+# 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'
+
+# Pass titles to terminal
+set-option -g set-titles on
+set-option -g set-titles-string "[#S : #W : #T]"
+
 
 # {{{{ Gruvbox color scheme
 # https://github.com/egel/tmux-gruvbox/blob/master/tmux-gruvbox-dark.conf
@@ -50,7 +65,7 @@ set-option -g status-right-style none
 set-option -g status-right-length "80"
 set-window-option -g window-status-separator ""
 
-set-option -g status-left "#[fg=colour248, bg=colour241] #S #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]"
+set-option -g status-left "#[fg=colour248, bg=colour241] #S: #T #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]"
 set-option -g status-right "#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %Y-%m-%d  %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#[fg=colour237, bg=colour248] #h "
 
 set-window-option -g window-status-current-format "#[fg=colour237, bg=colour214, nobold, noitalics, nounderscore]#[fg=colour239, bg=colour214] #I #[fg=colour239, bg=colour214, bold] #W #[fg=colour214, bg=colour237, nobold, noitalics, nounderscore]"