.tmux.conf 1.62 KB
Newer Older
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
1
2
# == Sessions ==

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
3
4
5
6
7
# Set prefix
set -g prefix C-Space
unbind C-b

# Set delay between prefix and command
Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
8
set -s escape-time 0
Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
9

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
10
11
# Enable/disable mouse control (clickable windows, panes, resizable panes)
set -g mouse off
Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
12
13

# Tmux has trouble figuring out the number of colours available in terminal
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
14
15
set -g default-terminal "tmux-256color"

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
16
# Enable persistent SSH key management across sessions
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
17
18
set -g update-environment "DISPLAY SSH_ASKPASS SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION WINDOWID XAUTHORITY"

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
19
20
21
# Scrollback history
set -g history-limit 10000

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
22
23
# Easy config reload
bind-key r source-file ~/.tmux.conf \; display-message "~/.tmux.conf reloaded."
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
24
25
26

# == Windows and Panes ==

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
27
# Activity auto-renames window
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
28
29
setw -g automatic-rename on

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
30
31
32
33
34
# Use Alt-arrow keys to switch panes
bind -n M-Left select-pane -L
bind -n M-Right select-pane -R
bind -n M-Up select-pane -U
bind -n M-Down select-pane -D
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
35

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
36
37
38
# Shift arrow to switch windows
bind -n S-Left previous-window
bind -n S-Right next-window
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
39

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
40
41
42
# Set easier window split keys
bind-key v split-window -h
bind-key h split-window -v
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
43

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
44
45
46
# Toggle between last and current window
bind -n M-t last-window

Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
47
48
# == Status Bar ==

Daniel Wayne Armstrong's avatar
save    
Daniel Wayne Armstrong committed
49
50
51
52
53
54
55
56
57
# Status line colours
set -g status-bg black
set -g status-fg white

# window list colours
set -g window-status-style bg=default,fg=white
set -g window-status-current-style bg=red,fg=white,bright

# Status bar left
Daniel Wayne Armstrong's avatar
Daniel Wayne Armstrong committed
58
59
60
61
62
63
64
65
66
67
68
set -g status-left-length 20
set -g status-left ""
set -g status-interval 10
set -g status-justify right

# status bar right
set -g status-right "[#S] #[fg=blue,bold]#(cat /proc/loadavg | awk '{print $1,$2,$3}')"

# activity alerts
setw -g monitor-activity on
set -g visual-activity on