tmux: Update config
[shutils.git] / dotfiles / tmux / .tmux.conf
1 # Prefer xterm-256color as vim (neovim) within mutt switches to monochrome with
2 # screen-256color.
3 set -g default-terminal "xterm-256color"
4 set -g mouse on
5
6 set-window-option -g xterm-keys on
7
8 # Pass escape immediately to vim
9 set -sg escape-time 0
10
11 # Copy to X11 clipboard
12 bind -T copy-mode-vi y send-keys -X copy-pipe-and-cancel 'xclip -in -selection clipboard'
13
14 bind-key m set-option -g mouse on \; display 'Mouse: ON'
15 bind-key M set-option -g mouse off \; display 'Mouse: OFF'
16
17 # Let split et alii use the pane's current path as current path of the new pane
18 bind '"' split-window -c "#{pane_current_path}"
19 bind % split-window -h -c "#{pane_current_path}"
20 bind c new-window -c "#{pane_current_path}"
21
22 # Pass home and end keys
23 bind-key -n Home send Escape "OH"
24 bind-key -n End send Escape "OF"
25
26 # Pass titles to terminal
27 set-option -g set-titles on
28 set-option -g set-titles-string "[#S : #W : #T]"
29
30
31 # {{{{ Gruvbox color scheme
32 # https://github.com/egel/tmux-gruvbox/blob/master/tmux-gruvbox-dark.conf
33
34 ## COLORSCHEME: gruvbox dark
35 set-option -g status "on"
36
37 # pane style
38 set-option -g window-active-style bg=colour234
39 set-option -g pane-active-border-style fg=colour250 #fg2
40 set-option -g window-style bg=colour235
41 set-option -g pane-border-style fg=colour237 #bg1
42
43 # default statusbar color
44 set-option -g status-style bg=colour237,fg=colour223 # bg=bg1, fg=fg1
45
46 # default window title colors
47 set-window-option -g window-status-style bg=colour214,fg=colour237 # bg=yellow, fg=bg1
48
49 # default window with an activity alert
50 set-window-option -g window-status-activity-style bg=colour237,fg=colour248 # bg=bg1, fg=fg3
51
52 # active window title colors
53 set-window-option -g window-status-current-style bg=red,fg=colour237 # fg=bg1
54
55 # message infos
56 set-option -g message-style bg=colour239,fg=colour223 # bg=bg2, fg=fg1
57
58 # writing commands inactive
59 set-option -g message-command-style bg=colour239,fg=colour223 # bg=fg3, fg=bg1
60
61 # pane number display
62 set-option -g display-panes-active-colour colour250 #fg2
63 set-option -g display-panes-colour colour237 #bg1
64
65 # clock
66 set-window-option -g clock-mode-colour colour109 #blue
67
68 # bell
69 set-window-option -g window-status-bell-style bg=colour167,fg=colour235 # bg=red, fg=bg
70
71 ## Theme settings mixed with colors (unfortunately, but there is no cleaner way)
72 set-option -g status-justify "left"
73 set-option -g status-left-style none
74 set-option -g status-left-length "80"
75 set-option -g status-right-style none
76 set-option -g status-right-length "80"
77 set-window-option -g window-status-separator ""
78
79 set-option -g status-left "#[fg=colour248, bg=colour241] #S: #T #[fg=colour241, bg=colour237, nobold, noitalics, nounderscore]"
80 set-option -g status-right "#[fg=colour239, bg=colour237, nobold, nounderscore, noitalics]#[fg=colour246,bg=colour239] %b %d  %H:%M #[fg=colour248, bg=colour239, nobold, noitalics, nounderscore]#[fg=colour237, bg=colour248] #h "
81
82 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]"
83 set-window-option -g window-status-format "#[fg=colour237,bg=colour239,noitalics]#[fg=colour223,bg=colour239] #I #[fg=colour223, bg=colour239] #W #[fg=colour239, bg=colour237, noitalics]"