-
Notifications
You must be signed in to change notification settings - Fork 1
/
.tmux.conf
59 lines (49 loc) · 2.04 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
# Set prefix key to Ctrl-a
unbind-key C-b
set-option -g prefix C-a
bind-key C-a last-window # 方便切换,个人习惯
bind-key a send-prefix
# shell下的Ctrl+a切换到行首在此配置下失效,此处设置之后Ctrl+a再按a即可切换至shell行首
# reload settings # 重新读取加载配置文件
bind R source-file ~/.tmux.conf \; display-message "Config reloaded..."
# Ctrl-Left/Right cycles thru windows (no prefix)
# 不使用prefix键,使用Ctrl和左右方向键方便切换窗口
bind-key -n "C-Left" select-window -t :-
bind-key -n "C-Right" select-window -t :+
# displays
bind-key * list-clients
set -g default-terminal "screen-256color" # use 256 colors
set -g display-time 5000 # status line messages display
set -g status-utf8 on # enable utf-8
set -g history-limit 100000 # scrollback buffer n lines
setw -g mode-keys vi # use vi mode
# start window indexing at one instead of zero 使窗口从1开始,默认从0开始
set -g base-index 1
set-window-option -g pane-base-index 1
# key bindings for horizontal and vertical panes
unbind %
bind \ split-window -h -c "#{pane_current_path}" # 使用\竖屏,方便分屏
unbind '"'
bind - split-window -v -c "#{pane_current_path}" # 使用-横屏,方便分屏
bind c new-window -c "#{pane_current_path}"
# window title string (uses statusbar variables)
set -g set-titles-string '#T'
# status bar with load and time
set -g status-bg black
set -g status-fg '#bbbbbb'
set -g status-left-fg green
set -g status-left-bg black
set -g status-right-fg green
set -g status-right-bg black
set -g status-left-length 90
set -g status-right-length 90
set -g status-left '[#(whoami)]'
set -g status-right '[#(date +" %m-%d %H:%M ")]'
set -g status-justify "centre"
set -g window-status-format '#I #W'
set -g window-status-current-format ' #I #W '
setw -g window-status-current-bg black
setw -g window-status-current-fg green
# pane border colors
set -g pane-active-border-fg '#55ff55'
set -g pane-border-fg '#555555'