-
Notifications
You must be signed in to change notification settings - Fork 1
/
dot_tmux.conf
executable file
·107 lines (77 loc) · 2.5 KB
/
dot_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
# Plugins
set -g @plugin 'tmux-plugins/tpm'
# Initialize TMUX plugin manager
# (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'
# Plugins
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Auto restore the tmux session
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
set -g @continuum-restore 'on'
# Prefix key is [Ctrl+t]
set -g prefix C-t
# Release default prefix key
unbind C-b
# Escape time dilay [-1]
set -sg escape-time 1
# Start number of window index is [1]
set -g base-index 1
# Start number of pain index is [1]
setw -g pane-base-index 1
# Reload config
bind r source-file ~/.tmux.conf \; display "Reloaded!"
# Open new window
bind t new-window -c "#{pane_current_path}"
# Split of vertical is [v]
bind v split-window -h -c "#{pane_current_path}"
# Split is [s]
bind s split-window -v -c "#{pane_current_path}"
# Key bind for move pain kind Vim
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
# Key bind for resize pain kind Vim
bind -r H resize-pane -L 10
bind -r J resize-pane -D 10
bind -r K resize-pane -U 10
bind -r L resize-pane -R 10
# Key bind for switch session
bind N switch-client -n
bind P switch-client -p
# Key bind reanme session
bind R command-prompt -I "#S" "rename-session '%%'"
# Key bind kill current window
bind X confirm-before -p "kill-window #W? (y/n)" kill-window
# Key bind kill current session
bind D confirm-before -p "kill-session #S? (y/n)" kill-session
# Mouse control on
setw -g mouse on
# Corlor 256
set -g default-terminal "screen-256color"
# Status bar color
set -g status-style fg=white,bg=black
# Color of window list
setw -g window-status-style fg=cyan,bg=default,dim
# Color of active window
setw -g window-status-current-style fg=black,bg=green,bright
# Color of pain border
set -g pane-border-style fg=white,bg=black
# Color of active pain
set -g pane-active-border-style fg=white,bg=blue
# Use vim keybindings in copy mode
setw -g mode-keys vi
if-shell 'test "$(uname -s)" = Darwin' "source-file ~/.tmux.conf.osx"
if-shell 'test "$(uname -s)" = Linux' "source-file ~/.tmux.conf.linux"
# Left status bar display setting
set -g status-interval 1
set -g status-left-length 20
set -g status-left "[ Session: #S ] "
# Window display setting
setw -g window-status-format " #F#I.#W#F "
setw -g window-status-current-format " #F#I.#W#F "
# Right status bar display setting
set -g status-right-length 60
set -g status-right "%m/%d %H:%M:%S#[default]"