aboutsummaryrefslogtreecommitdiffstats
path: root/tmux.conf
blob: df6f5a678be137923fad34822ec512214e5239b7 (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
# Use C-a like screen
set -g prefix ^a

# Use 1 as base index
set -g base-index 1
set-window-option -g pane-base-index 1

# Go to last active window with C-a C-a
bind-key C-a last-window

# Status bar
set -g status-style "bg=default,fg=white"
set -g status-left ""
set -g status-right "#[fg=green]%F %R #[fg=yellow]#h"

# Highlight active window
# Print available colors:
# for i in {0..255} ; do printf "\x1b[38;5;${i}mcolour${i}\n"; done
set-window-option -g window-status-current-style bg=colour52

# Enable mouse support
set -g mouse on

# Select panes using arrow keys
bind-key up select-pane -U
bind-key down select-pane -D
bind-key left select-pane -L
bind-key right select-pane -R

# F1-F12 selects windows 1-12
bind-key -n F1 select-window -t 1
bind-key -n F2 select-window -t 2
bind-key -n F3 select-window -t 3
bind-key -n F4 select-window -t 4
bind-key -n F5 select-window -t 5
bind-key -n F6 select-window -t 6
bind-key -n F7 select-window -t 7
bind-key -n F8 select-window -t 8
bind-key -n F9 select-window -t 9
bind-key -n F10 select-window -t 10
bind-key -n F11 select-window -t 11
bind-key -n F12 select-window -t 12

# Command sequence for nested tmux sessions
bind-key a send-prefix

# Set terminal title
set -g set-titles on
set -g set-titles-string "#S:#I:#W #h"

# Allow terminal to change window name
set-window-option -g allow-rename on

# Remember path in new windows. This was the default behaviour in < 1.9
bind-key c new-window -c '#{pane_current_path}'
bind-key '"' split-window -c '#{pane_current_path}'
bind-key % split-window -h -c '#{pane_current_path}'