-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.tmux.conf
78 lines (63 loc) · 3.27 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
bind '"' split-window -c "#{pane_current_path}"
bind % split-window -h -c "#{pane_current_path}"
bind c new-window -c "#{pane_current_path}"
bind j join-pane -h -s !
setw -g mode-keys vi
set -g status-keys vi
# Smart pane switching with awareness of Vim splits.
# See: https://github.com/christoomey/vim-tmux-navigator
is_vim="ps -o state= -o comm= -t '#{pane_tty}' \
| grep -iqE '^[^TXZ ]+ +(\\S+\\/)?g?(view|n?vim?x?)(diff)?$'"
bind-key -n M-h if-shell "$is_vim" "send-keys M-h" "select-pane -L"
bind-key -n M-j if-shell "$is_vim" "send-keys M-j" "select-pane -D"
bind-key -n M-k if-shell "$is_vim" "send-keys M-k" "select-pane -U"
bind-key -n M-l if-shell "$is_vim" "send-keys M-l" "select-pane -R"
bind-key -n M-'\' if-shell "$is_vim" "send-keys M-\\" "select-pane -l"
bind-key -T copy-mode-vi M-h select-pane -L
bind-key -T copy-mode-vi M-j select-pane -D
bind-key -T copy-mode-vi M-k select-pane -U
bind-key -T copy-mode-vi M-l select-pane -R
bind-key -T copy-mode-vi M-'\' select-pane -l
set -ga terminal-overrides ",*256col*:Tc"
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
#bind key + C-s, bind key + C-r을 이용해 전체 tmux session들을 저장 및 복구할 수 있다.
set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @resurrect-strategy-nvim 'session'
set -g @resurrect-processes '"git log" tty-clock bat ssh multitail gotop psql mysql sqlite3'
set -g @plugin 'wfxr/tmux-power'
set -g @tmux_power_theme 'sky'
#set -g @tmux_power_theme 'default'
set -g @tmux_power_date_icon 'D'
set -g @tmux_power_time_icon 'T'
set -g @tmux_power_user_icon 'U'
set -g @tmux_power_session_icon 'S'
#set -g @tmux_power_upload_speed_icon ' '
#set -g @tmux_power_download_speed_icon ' '
#set -g @tmux_power_left_arrow_icon '<'
#set -g @tmux_power_right_arrow_icon '>'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @tmux_power_prefix_highlight_pos 'LR'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]:user/plugin'
# set -g @plugin '[email protected]:user/plugin'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
if "test ! -d $HOME/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm $HOME/.tmux/plugins/tpm && $HOME/.tmux/plugins/tpm/bin/install_plugins'"
run "$HOME/.tmux/plugins/tpm/tpm"
# Use v to trigger selection
bind-key -T copy-mode-vi v send-keys -X begin-selection
# Forked from https://blog.landofcrispy.com/index.php/2021/01/06/clipboard-integration-between-tmux-nvim-zsh-x11-across-ssh-sessions/
unbind-key -T copy-mode-vi y
bind-key -T copy-mode-vi y send-keys -X copy-selection-and-cancel \; run-shell -b ~/.clipboard/tmuxcopypush.sh
unbind-key -T copy-mode-vi Enter
bind-key -T copy-mode-vi Enter send-keys -X copy-selection-and-cancel \; run-shell -b ~/.clipboard/tmuxcopypush.sh
unbind-key -T copy-mode-vi A
bind-key -T copy-mode-vi A send-keys -X append-selection-and-cancel \; run-shell -b ~/.clipboard/tmuxcopypush.sh
unbind-key -T copy-mode-vi D
bind-key -T copy-mode-vi D send-keys -X copy-end-of-line \; run-shell -b ~/.clipboard/tmuxcopypush.sh
unbind-key -T copy-mode C-w
bind-key -T copy-mode C-w send-keys -X copy-selection-and-cancel \; run-shell -b ~/.clipboard/tmuxcopypush.sh
set -g default-terminal "xterm-256color"