aboutsummaryrefslogtreecommitdiff
path: root/tmux/tmux.conf
blob: 769cd05b4a423b86efd228458e4e0f6a221dc7ff (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# Set the prefix to C-A.
unbind-key C-b
set-option -g prefix C-a

# GNU Screen rebindings.
unbind-key '"'
unbind-key '|'
unbind-key '-'
unbind-key '/'
unbind-key '\'
unbind-key a
unbind-key A
unbind-key C-a
unbind-key C-c
unbind-key C-d
unbind-key C-h
unbind-key C-j
unbind-key C-k
unbind-key C-l
unbind-key C-n
unbind-key C-p
unbind-key h
unbind-key j
unbind-key k
unbind-key l
unbind-key n
unbind-key p
unbind-key s
unbind-key Tab
bind-key '"' choose-window
bind-key '|' split-window -h
bind-key '-' split-window -v
bind-key '/' confirm-before "kill-window"
bind-key '\' confirm-before "kill-server"
bind-key a send-prefix
bind-key A command-prompt "rename-window %%"
bind-key C-a last-window
bind-key C-c new-window
bind-key C-d detach
bind-key C-h select-pane -L
bind-key C-j select-pane -D
bind-key C-k select-pane -U
bind-key C-l select-pane -R
bind-key C-n next-window
bind-key C-p previous-window
bind-key c new-window
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key n next-window
bind-key p previous-window
bind-key s choose-session
bind-key Tab select-pane -t :.+

# Use a sort of vi-ish copy-paste.
bind-key -t vi-copy 'v' begin-selection
bind-key -t vi-copy 'y' copy-selection

# Terminal settings.
set-option -g default-terminal "screen-256color"

# Start window numbering at 1, not 0.
set-option -g base-index 1

# Don't worry about escape sequences.
set-option -s escape-time 0

# Spiffy colours.
set-option -g status-fg colour248
set-option -g status-bg colour237
set-option -g pane-border-fg colour237
set-option -g pane-border-bg colour237
set-option -g pane-active-border-fg colour237
set-option -g pane-active-border-bg colour237

# Set status bar text to the left and right.
set-option -g status-left '[#S]'
set-option -g status-right '[#H] #(date +"%F %T")'

# Fix freezing issue.
set-option -g set-titles off

# Sane scrolling.
set-option -g terminal-overrides 'xterm*:smcup@:rmcup@'

# Set colours for messages and status lines.
set-option -g message-fg colour231
set-option -g message-bg colour18

# Don't automatically rename windows.
set-window-option -g automatic-rename off

# Use Vi mode.
set-window-option -g mode-keys vi

# Use two-space separators, and forget the status indicator.
set-window-option -g window-status-format "#[fg=colour16]#I:#W#F"
set-window-option -g window-status-current-format "#[fg=colour231]#I:#W#F"

# Set colours for choosing dialogs.
set-window-option -g mode-fg colour231
set-window-option -g mode-bg colour18

# Monitor window activity.
set-window-option -g monitor-activity on

# Source local configuration.
source-file ~/.tmux.conf.local