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