-
Notifications
You must be signed in to change notification settings - Fork 12
/
tmux.conf
149 lines (109 loc) · 4.55 KB
/
tmux.conf
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
# ------------------------------------------------------------------------------
# FILE: .tmux.conf
# DESCRIPTION: tmux configuration file based off Sorin Ionescu's.
# AUTHOR: Christopher Chow (chris at chowie dot net)
# ------------------------------------------------------------------------------
# ------------------------------------------------------------------------------
# General Options
# ------------------------------------------------------------------------------
# Inform programs of colour support.
set-option -g default-terminal "screen-256color"
set-option -sa terminal-features ",xterm-256color:clipboard"
# Open new windows with Mac OS X pasteboard support.
set -g default-shell $SHELL
# Enable mouse.
set-option -g mode-keys vi
set-option -g mouse on
# Disable visual notifications.
set-option -g visual-activity off
# Disable bell notifications.
set-option -g bell-action none
# Disable window activity notifications.
set-window-option -g monitor-activity on
# Scroll back buffer n lines.
set-option -g history-limit 100000
# Enable terminal window titles.
set-option -g set-titles on
# Make C-left, C-right work.
set-window-option -g xterm-keys on
# Automatically rename terminal title.
set-window-option -g automatic-rename on
set-option -g allow-rename off
# Set terminal title format (uses status bar variables).
set-option -g set-titles-string "#S"
# Start window indexing at one instead of zero.
set-option -g base-index 1
set-window-option -g pane-base-index 1
# Reduce esc time.
set-option -s escape-time 0
# ------------------------------------------------------------------------------
# General Key Bindings
# ------------------------------------------------------------------------------
# Use C-e instead.
set-option -g prefix C-e
# Toggle status bar.
bind-key 'b' set-option status
# Resize panes like vim
bind < resize-pane -L 10
bind > resize-pane -R 10
bind - resize-pane -D 10
bind + resize-pane -U 10
bind-key -n 'S-right' next-window
bind-key -n 'S-left' previous-window
bind-key -n 'M-right' next-window
bind-key -n 'M-left' previous-window
# Use vim keybindings in copy mode
setw -g mode-keys vi
set -g status-keys vi
bind-key -Tcopy-mode-vi 'v' send -X begin-selection
bind-key -Tcopy-mode-vi 'Escape' send -X cancel
bind-key -Tcopy-mode-vi 'V' send -X select-line
bind-key -Tcopy-mode-vi 'r' send -X rectangle-toggle
bind-key -Tcopy-mode-vi 'y' send -X copy-pipe-and-cancel 'pbcopy'
bind-key -Tcopy-mode-vi MouseDragEnd1Pane send-keys -X copy-pipe-and-cancel 'pbcopy'
unbind -Tcopy-mode-vi 'Enter'
bind-key -Tcopy-mode-vi 'Enter' send -X copy-pipe-and-cancel 'pbcopy'
# ------------------------------------------------------------------------------
# Status Bar
# ------------------------------------------------------------------------------
# Use UTF-8 in status bar.
# set-option -g status-utf8 on
# Use key map for the status bar.
set-option -g status-keys vi
# Update the status bar every n seconds.
set-option -g status-interval 60
# Status bar format.
set-option -g status-left ''
set-option -g status-right "#(battery -t -a) #[fg=blue][#[default]%a %d %b %H:%M#[default]#[fg=blue]]#[default]"
# On-screen time for display-panes in ms.
set-option -g display-time 2000
# Default status bar colours.
set-option -g status-fg white
set-option -g status-bg black
set-option -g status-style bright
# Active window title colours.
set-option -g window-status-current-style fg=green,bg=black,bright,bold
# Inactive window title colours.
set-option -g window-status-style fg=white,bg=black
set-option -g window-status-activity-style fg=white,bg=black,blink
set-option -g window-status-bell-style fg=white,bg=black,blink
# Command/message line colours.
set-option -g message-style fg=white,bg=black,bright
# ------------------------------------------------------------------------------
# Panes
# ------------------------------------------------------------------------------
set-option -g display-panes-time 2000
# Pane borders.
set-option -g pane-border-style fg=white
set-option -g pane-active-border-style fg=blue
# ------------------------------------------------------------------------------
# Clock
# ------------------------------------------------------------------------------
set-window-option -g clock-mode-colour cyan
set-window-option -g clock-mode-style 24
# ------------------------------------------------------------------------------
# Plugins
# ------------------------------------------------------------------------------
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
run '~/.tmux/plugins/tpm/tpm'