]> git.phdru.name Git - dotfiles.git/blob - .tmux.conf
72b57b5e6b7d94d09c99e813d0dcfb7d344f2148
[dotfiles.git] / .tmux.conf
1 # Start window numbers at 1 to match keyboard order with tmux window order
2 set-option -g base-index 1
3 set-option -g pane-base-index 1
4 # Renumber windows sequentially after closing any of them
5 set-option -g renumber-windows on
6
7 # Keyboard
8 set-window-option -g mode-keys vi
9 # Pass [Ctrl]+[PgUp/PgDn]
10 set-window-option -g xterm-keys on
11 # Don't wait for [Esc] to allow fast switching from insert mode to normal in vim
12 # Set (and export) environment variable SLOWTERM to override.
13 if-shell "test -z $SLOWTERM" "set-option -gs escape-time 0"
14
15 # Mouse
16 #set-option -g mouse on
17
18 # Rather than constraining window size to the maximum size of any client
19 # connected to the *session*, constrain window size to the maximum size of any
20 # client connected to *that window*. Much more reasonable.
21 set-window-option -g aggressive-resize on
22
23 # Activity monitoring
24 set-option -g visual-activity on
25 set-window-option -g monitor-activity on
26
27 # Clock color
28 set-window-option -g clock-mode-colour black
29
30 # Attempt to set the client terminal title
31 set-option -g set-titles on
32 # Terminal emulator window title
33 set-option -g set-titles-string 'tmux #S.#I.#P #T' # session, window number, pane number, title
34
35 set-option -g message-style bg=black,fg=white
36
37 # Soften status bar color from black on harsh green to black on cyan
38 set-option -g status-style bg=cyan,fg=black
39
40 set-option -g pane-active-border-style bg=default,fg=red
41 set-option -g pane-border-style bg=default,fg=blue
42
43 set-window-option -g mode-style bg=black
44
45 set-window-option -g window-status-activity-style fg=yellow
46 set-window-option -g window-status-bell-style fg=red
47 set-window-option -g window-status-current-style bg=blue,fg=white
48 set-window-option -g window-status-style bg=cyan,fg=black
49
50 set-option -g status-left '[#S.#I.#P]'
51
52 # set-option -g status-interval 5
53 # set-option -g status-right '%H:%M'
54 set-option -g status-right ''
55
56 # Increase scrollback lines
57 set-option -g history-limit 1000
58
59 # Set the command prefix to match GNU screen (CTRL+a)
60 # set-option -g prefix C-a
61 #
62 # Use C-a C-a key to send prefix instead of the default
63 # unbind-key C-b
64 # bind-key C-a send-prefix
65 #
66 # <prefix> C-a for last-window
67 # bind-key C-a last-window
68
69 # <prefix> R to reload config without restart
70 bind-key R source-file ~/.tmux.conf \; display "Configuration reloaded!"
71
72 # vim-like navigation
73 unbind-key h; bind-key h select-pane -L
74 unbind-key j; bind-key j select-pane -D
75 unbind-key k; bind-key k select-pane -U
76 unbind-key l; bind-key l select-pane -R
77
78 bind H resize-pane -L 10
79 bind J resize-pane -D 10
80 bind K resize-pane -U 10
81 bind L resize-pane -R 10
82
83 bind -r C-h select-window -t :-
84 bind -r C-l select-window -t :+
85
86 # Use vertical and horizontal chars to split the screen
87 bind-key | split-window -h
88 bind-key - split-window -v
89
90 bind-key -t vi-copy v begin-selection
91 bind-key -t vi-copy y copy-selection
92 bind-key -t vi-copy r rectangle-toggle
93 bind P paste-buffer
94
95 # Copy tmux copy buffer to X clipboard
96 bind -t vi-copy C-y copy-pipe "xclip -i"
97 # Copy X clipboard to tmux paste buffer
98 bind C-p run-shell "xclip -o | tmux load-buffer -; tmux paste-buffer"