在home目录下创建.tmux.conf文件,填入一下内容:
1 #Enable mouse mode (tmux 2.1 and above)
2 setw -g mouse on
3 set -g mouse on
4
5 #Enable oh my zsh in tmux
6 set -g default-command /bin/zsh
7
8 # Mouse based copy
9 bind-key -T copy-mode-vi MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"
10 bind-key -T copy-mode MouseDragEnd1Pane send -X copy-pipe-and-cancel "reattach-to-user-namespace pbcopy"••
11
12
13 #设置终端颜色为256色••
14 set -g default-terminal "screen-256color"••
15 #设置status bar格式••
16 set -g status-left-length 40••
17 set -g status-left "#[fg=green]Session: #S #[fg=yellow]#I #[fg=cyan]#P"••
18 set -g status-right "#[fg=cyan]%b %d %R"••
19 set -g status-interval 60••
20 set -g status-justify centre•