-
Notifications
You must be signed in to change notification settings - Fork 0
/
.tmux.conf
30 lines (21 loc) · 882 Bytes
/
.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
set-option -g mouse on
# 参考
# https://github.com/tmux-plugins/tmux-sensible
# increase scrollback buffer size
set -g history-limit 50000
# tmux messages are displayed for 4 seconds
set -g display-time 4000
# refresh 'status-left' and 'status-right' more often
set -g status-interval 5
# upgrade $TERM
set -g default-terminal "screen-256color"
# focus events enabled for terminals that support them
set -g focus-events on
# super useful when using "grouped sessions" and multi-monitor setup
setw -g aggressive-resize on
# ===== logging =====
#
# C-b C-p Start logging.
bind-key C-p pipe-pane -o '/bin/sh -c "while read -r LINE; do echo \"[\$(date +\"%%Y_%%m%%d_%%H%%M%%S\")] \${LINE}\" >> \${HOME}/.tmux/log/\$(date +%Y%m%d-%H%M%S)-#S-#I.#P.log; done "' \; display-message "Logging start."
# C-b C-o Stop logging
bind-key C-o pipe-pane \; display-message "Logging end."