-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtmux.conf
95 lines (74 loc) · 2.71 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
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
set-environment -g PATH "/opt/homebrew/bin:/usr/local/bin:/bin:/usr/bin"
# List of plugins
set-option -g @tpm_plugins ' \
tmux-plugins/tpm \
tmux-plugins/tmux-sensible \
tmux-plugins/tmux-resurrect \
tmux-plugins/tmux-continuum \
tmux-plugins/tmux-battery \
tmux-plugins/tmux-cpu \
tmux-plugins/tmux-urlview \
tmux-plugins/tmux-pain-control \
ki-chi/tmux-inputmethod \
yanskun/tmux-my-plugin \
yanskun/tmux-work-dir \
robhurring/tmux-spotify \
'
set -g prefix C-b
# plugin config
## tmux-continum
set -g @continuum-restore 'on'
set -g @continuum-save-interval '10'
# status bar
set-option -g default-terminal "xterm-256color"
set-option -g status-position bottom
set-option -g status-interval 1
set-option -g status-right-length 100
set-option -g status-left-length 70
set-option -g status-right "\
#[fg=colour22]#[bg=colour0]#[fg=colour255]#[bg=colour22]\
#{iptmthd} |\
#{battery_icon} #{battery_percentage}% |\
#[fg=colour255]%m/%d(%a) %H:%M:%S#[default] "
# #(networkQuality | grep 'Upload capacity' | sed -e 's/Upload capacity: //') ¥
set-option -g status-left "\
#[fg=colour255]#[bg=colour236]\
#S:#I:#P |\
#{artist}: #{track}\
#[fg=colour236]#[bg=colour0]"
set-option -g status-justify centre
set-window-option -g window-status-current-format '\
#[fg=colour239]#[bg=colour234]#[bg=colour239]#[fg=colour119]\
#I#[fg=colour249]:#[fg=colour255]#W\
#[fg=colour239]#[bg=colour234]'
set-option -g status-bg black
set-option -g status-fg white
# rename windows
set-option -g automatic-rename on
set-option -g automatic-rename-format '#{b:pane_current_path}'
set-option -g default-shell $SHELL
set -g default-command $SHELL
# prefix
set-option -g prefix C-b
# key bind
bind-key r source-file ~/.tmux.conf \; display-message "Reload Config!!"
unbind-key -n Tab
set-window-option -g mode-keys vi
# clipboard
set -g default-command "reattach-to-user-namespace $SHELL --login"
# bind-key -T copy-mode-vi v send-keys -X begin-selection
# bind-key -T copy-mode-vi y send-keys -X copy-pipe-and-cancel "win32yank.exe -i"
# bind p run-shell 'win32yank.exe -o | xargs -0 -I{} tmux set-buffer -- {} && tmux paste-buffer'
# enable mouse action
set-option -g mouse on
bind-key -T edit-mode-vi WheelUpPane send-keys -X scroll-up
bind-key -T edit-mode-vi WheelDownPane send-keys -X scroll-down
# pane
set -g display-panes-time 10000
# open current directory in new window
bind-key c new-window -c "#{pane_current_path}"
bind-key '"' split-window -c "#{pane_current_path}"
bind-key % split-window -h -c "#{pane_current_path}"
bind-key P run-shell "tmux popup -d '#{pane_current_path}' -h 50% | exit 0"
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run "~/.tmux/plugins/tpm/tpm"