-
Notifications
You must be signed in to change notification settings - Fork 3
/
.tmux.conf
45 lines (37 loc) · 1.12 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
set -g default-terminal "xterm-256color"
# 取消默认引导键 Ctrl-B 的绑定
unbind C-b
# 设定新的引导键为 Ctrl-S
set -g prefix C-g
# 设置连按两下引导键来发送该按键本身
bind C-g send-prefix
# 设置显示行数
set -g history-limit 9999
bind-key h select-pane -L
bind-key j select-pane -D
bind-key k select-pane -U
bind-key l select-pane -R
bind-key q set synchronize-panes
bind-key T pipe-pane "exec cat >>~/#W-tmux-`date +%Y%m%d%H%M%S`.log" \; display-message 'Started logging to ~/#W-tmux-`date +%Y%m%d%H%M%S`.log'
bind-key t pipe-pane \; display-message 'Ended logging to ~/#W-tmux-`date +%Y%m%d%H%M%S`.log'
# copy like vi
set-window-option -g mode-keys vi
#set-window-option -g mouse on
setenv -g SSH_AUTH_SOCK $HOME/.ssh/ssh_auth_sock
set -g update-environment -r
#
# add this to .bashrc
#
#if [ -z "$TMUX" ]; then
# # we're not in a tmux session
# if [ ! -z "$SSH_TTY" ]; then
# # We logged in via SSH
# if test "$SSH_AUTH_SOCK"; then
# ln -sf $SSH_AUTH_SOCK ~/.ssh/ssh_auth_sock
# fi
#
# if tmux ls; then
# exec tmux attach
# fi
# fi
#fi