]> git.phdru.name Git - dotfiles.git/blob - .tmux.conf
lib/config/gpg-agent-update-tty: Change gpg-connect-agent command line
[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-window-option -g mode-mouse on
17 set-option -g mouse-select-pane on
18 set-option -g mouse-resize-pane on
19 # Mouse can be used to select windows (by clicking in the status bar)
20 set-option -g mouse-select-window on
21
22 # Rather than constraining window size to the maximum size of any client
23 # connected to the *session*, constrain window size to the maximum size of any
24 # client connected to *that window*. Much more reasonable.
25 set-window-option -g aggressive-resize on
26
27 # Activity monitoring
28 set-option -g visual-activity on
29 set-window-option -g monitor-activity on
30
31 # Clock color
32 set-window-option -g clock-mode-colour black
33
34 # Attempt to set the client terminal title
35 set-option -g set-titles on
36 # Terminal emulator window title
37 set-option -g set-titles-string 'tmux #S.#I.#P #T' # session, window number, pane number, title
38
39 set-option -g message-style bg=black,fg=white
40
41 # Soften status bar color from black on harsh green to black on cyan
42 set-option -g status-style bg=cyan,fg=black
43
44 set-option -g pane-active-border-style bg=default,fg=red
45 set-option -g pane-border-style bg=default,fg=blue
46
47 set-window-option -g mode-style bg=black
48
49 set-window-option -g window-status-activity-style fg=yellow
50 set-window-option -g window-status-bell-style fg=red
51 set-window-option -g window-status-content-style fg=magenta
52 set-window-option -g window-status-current-style bg=blue,fg=white
53 set-window-option -g window-status-style bg=cyan,fg=black
54
55 set-option -g status-left '[#S.#I.#P]'
56
57 # set-option -g status-interval 5
58 # set-option -g status-right '%H:%M'
59 set-option -g status-right ''
60
61 # Increase scrollback lines
62 set-option -g history-limit 1000
63
64 # Set the command prefix to match GNU screen (CTRL+a)
65 # set-option -g prefix C-a
66 #
67 # Use C-a C-a key to send prefix instead of the default
68 # unbind-key C-b
69 # bind-key C-a send-prefix
70 #
71 # <prefix> C-a for last-window
72 # bind-key C-a last-window
73
74 # <prefix> R to reload config without restart
75 bind-key R source-file ~/.tmux.conf \; display "Configuration reloaded!"
76
77 # vim-like navigation
78 unbind-key h; bind-key h select-pane -L
79 unbind-key j; bind-key j select-pane -D
80 unbind-key k; bind-key k select-pane -U
81 unbind-key l; bind-key l select-pane -R
82
83 bind H resize-pane -L 10
84 bind J resize-pane -D 10
85 bind K resize-pane -U 10
86 bind L resize-pane -R 10
87
88 bind -r C-h select-window -t :-
89 bind -r C-l select-window -t :+
90
91 # Use vertical and horizontal chars to split the screen
92 bind-key | split-window -h
93 bind-key - split-window -v
94
95 bind-key -t vi-copy v begin-selection
96 bind-key -t vi-copy y copy-selection
97 bind-key -t vi-copy r rectangle-toggle
98 bind P paste-buffer
99
100 # Copy tmux copy buffer to X clipboard
101 bind -t vi-copy C-y copy-pipe "xclip -i"
102 # Copy X clipboard to tmux paste buffer
103 bind C-p run-shell "xclip -o | tmux load-buffer -; tmux paste-buffer"