-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
89 lines (70 loc) · 2.38 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
# memo:
# set: set-option
# setw: set-window-option
# mouse
set -g mouse on
bind -n WheelUpPane if-shell -F -t = "#{mouse_any_flag}" "send-keys -M" "if -Ft= '#{pane_in_mode}' 'send-keys -M' 'copy-mode -e'"
set -g status-interval 2
set -g renumber-windows on
set -g base-index 1
if "test -d /usr/local/bin/zsh" "set -g default-shell /usr/local/bin/zsh"
if "test -d /opt/homebrew/bin/zsh" "set -g default-shell /opt/homebrew/bin/zsh"
set -g default-terminal screen-256color
set -g default-command "exec reattach-to-user-namespace -l $SHELL"
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
# vi keybind
set -g mode-keys vi
setw -g mode-keys vi
# copy
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi y send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind -T copy-mode-vi Enter send-keys -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
bind p paste-buffer
## vim-style moving panes
bind h select-pane -L
bind j select-pane -U
bind k select-pane -D
bind l select-pane -R
## vim-style resize panes
bind H resize-pane -L 5
bind J resize-pane -D 5
bind K resize-pane -U 5
bind L resize-pane -R 5
# reload tmux.conf
bind r source-file ~/.tmux.conf \; display-message "Reloaded tmux.conf"
# status bar
set -g status-justify centre
setw -g monitor-activity on
set -g visual-activity on
set -g pane-border-style fg="colour153"
## status bar color / current pane
set -g status-fg cyan
set -g status-bg black
setw -g window-status-activity-style bg="black",fg="cyan"
## info
set -g status-interval 1
set -g status-left-length 40
set -g status-right-length 50
set -g status-left "#[fg=cyan]#{?client_prefix,#[reverse],}Session: #S #I #P "
set -g status-right "#[fg=cyan]#{?client_prefix,#[reverse],} // [%Y-%m-%d(%a) %H:%M:%S]"
## split-window
bind % split-window -h -c '#{pane_current_path}'
bind '"' split-window -v -c '#{pane_current_path}'
# don't wait ESC call
set -g escape-time 0
# auto start terminal
set -g @continuum-boot 'on'
set -g @continuum-boot-options 'iterm'
# auto restore tmux
# set -g @continuum-restore 'on'
# header
set-option -g set-titles on
set-option -g set-titles-string "🚀#(todo next) // #W"
#plugins
set -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-open \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
'
run-shell '~/.tmux/plugins/tpm/tpm'