-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathjson.tmux.conf
118 lines (95 loc) · 3.08 KB
/
json.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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
## General Settings
set-option -g display-time 5000 #提示信息的持续时间;设置足够的时间以避免看不清提示,单位为毫秒
set-option -g repeat-time 1000 #控制台激活后的持续时间;设置合适的时间以避免每次操作都要先激活控制台,单位为毫秒
set -g status-keys vi
setw -g mode-keys vi
set -g base-index 1
set -g mouse on
set -g status-interval 3
set-window-option -g display-panes-time 1500
setw -g monitor-activity on
run-shell ~/.tmux/vendor/tmux-sidebar/sidebar.tmux
run-shell ~/.tmux/vendor/tmux-battery/battery.tmux
set -g @batt_remain_short true
## Status line
set -g status-bg default
set -g status-fg black
set -g status-left-length 160
set -g status-left " #[fg=red]Tmux #[fg=white] #[fg=green]#W#[fg=red] >> #[fg=green]#(sysctl -n vm.loadavg|sed 's,{,[,g'|sed 's,},],g') #[fg=red]>> #[fg=green]%m-%d %H:%M:%S #S"
set -g status-right-length 200
set -g status-right '#[fg=green,bg=default,bright]#(tmux-mem-cpu-load) #[fg=red,dim,bg=default]#{battery_icon} #{battery_percentage} #{battery_remain} #[fg=white,bg=default]%a%l:%M:%S %p#[default] #[fg=blue]%Y-%m-%d'
set -g status-justify right
setw -g window-status-format '#[fg=white]#I#[fg=black]#W'
setw -g window-status-current-format '#[fg=black]#I#[fg=red]#W'
set-window-option -g window-status-current-fg red
## Messages
set -g message-attr underscore
set -g message-fg black
set -g message-bg red
## Panes
set -g pane-border-fg black
set -g pane-active-border-fg black
setw -g automatic-rename on
set -g renumber-windows on
# 交换两个窗格
bind-key C-u swapp -U # 与上窗格交换 Ctrl-u
bind-key C-d swapp -D # 与下窗格交换 Ctrl-d
## Binds
set -g prefix C-a
unbind c
bind c new-window
bind C-c new-window
unbind &
unbind q
bind q kill-window
bind C-q kill-window
bind x kill-pane
bind C-x kill-pane
unbind l
bind C-a last-window
unbind C-b
bind a send-prefix
unbind n
bind n next-window
bind C-n next-window
unbind p
bind C-p previous-window
unbind d
bind d detach
bind C-d detach
set-option escape-time 0
unbind [
bind Escape copy-mode
bind-key Escape copy-mode
unbind-key p
bind-key p paste-buffer
#bind-key -t vi-copy v begin-selection
#bind-key -t vi-copy y copy-selection
#bind-key -t vi-copy C-v rectangle-toggle
unbind %
bind a split-window -h
bind | split-window -h
bind C-a split-window -h
unbind "'"
bind e split-window -v
bind _ split-window -v
bind C-e split-window -v
bind h select-pane -L
bind j select-pane -D
bind k select-pane -U
bind l select-pane -R
bind ^h resize-pane -L
bind ^j resize-pane -D
bind ^k resize-pane -U
bind ^l resize-pane -R
bind / command-prompt "split-window 'exec man %%'"
bind R source-file ~/data/data/.runtime/tmuxconfigs/json.tmux.conf \; display-message "Config reloaded.."
## Backup
#set -g set-remain-on-exit on
#set -g default-shell /bin/bash
#set -g default-command /bin/bash
#setw -g utf8 on
#set-option -g status-position top
#set -g status-utf8 on
#set -g status-left " #[fg=red]tmux#[fg=black]#W#[fg=red] >> #[fg=black]#(cat /proc/loadavg) #[fg=red]>> #[fg=black]%d/%m %H:%M:%S "
#set -g status-right ""