-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
72 lines (59 loc) · 1.92 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
# Variable that is true if tmux runs on macOS
tmux_macos='[ uname | grep -q Darwin ]'
# Watch for activity in background windows
setw -g monitor-activity on
set -g visual-activity on
# Set terminal
set -g default-terminal "xterm-256color"
# Misc
set -g history-limit 500000
# set first window to index 1 (not 0) to map more to the keyboard layout
set -g base-index 1
setw -g pane-base-index 1
# remap prefix to Control + a
set -g prefix C-a
unbind C-b
# bind 'C-a C-a' to type 'C-a'
bind C-a send-prefix
# Reload config
unbind r
bind r source-file ~/.tmux.conf \; display 'Reloaded!'
# Xterm
setw -g xterm-keys on
# Lower escape timing from 500ms to 50ms for quicker response to scroll-buffer access
set -s escape-time 50
# Better splitting
unbind %
unbind '"'
bind '\' split-window -h # Fix '
bind '-' split-window -v
# Key Mappings
bind-key -n M-n new-window -c "#{pane_current_path}"
bind-key -n M-1 select-window -t :1
bind-key -n M-2 select-window -t :2
bind-key -n M-3 select-window -t :3
bind-key -n M-4 select-window -t :4
bind-key -n M-5 select-window -t :5
bind-key -n M-6 select-window -t :6
bind-key -n M-7 select-window -t :7
bind-key -n M-8 select-window -t :8
bind-key -n M-9 select-window -t :9
bind-key -n M-0 select-window -t :0
bind-key -n M-. select-window -n
bind-key -n M-, select-window -p
bind-key -n M-< swap-window -t -1
bind-key -n M-> swap-window -t +1
bind-key -n M-X confirm-before "kill-window"
# Theme
# center align window list
set -g status-justify centre
# default statusbar colors
set -g status-style fg=white,bg=default
# default window title colors
setw -g window-status-style fg=cyan,bg=default,dim
# active window title colors
setw -g window-status-current-style fg=white,bg=red,bright
# MacOS (brew install reattach-to-user-namespace vim tmux)
if-shell "$tmux_macos" "set -g default-shell $SHELL; set -g default-command \"reattach-to-user-namespace -l ${SHELL}\""
# Enable mouse support
set-option -g mouse on