-
Notifications
You must be signed in to change notification settings - Fork 27
/
.tmux.conf
91 lines (86 loc) · 2.57 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
# {{{Settings
# non-login shell
set -g default-command "${SHELL}"
# override colors
set -g default-terminal "xterm-256color"
set -ga terminal-overrides ",*256col*:Tc"
# mouse support
set -g mouse on
# theme
source ~/.tmux/tmuxline/edge-dark.tmux.conf
# }}}
# {{{Mappings
# prefix key
unbind C-a
set -g prefix C-Space
bind C-Space send-prefix
# reload config file
bind-key -T prefix r source-file ~/.tmux.conf
# window
bind-key -T prefix C-t new-window
bind-key -T prefix C-w unlink-window -k
bind-key -n C-left prev
bind-key -n C-right next
bind-key -n C-up swap-window -t -1
bind-key -n C-down swap-window -t +1
bind-key -T prefix C-s split-window
bind-key -T prefix C-v split-window -h
# pane
bind-key -T prefix C-h select-pane -L
bind-key -T prefix C-j select-pane -D
bind-key -T prefix C-k select-pane -U
bind-key -T prefix C-l select-pane -R
bind-key -T prefix C-x kill-pane
# copy mode
bind-key -T prefix n copy-mode
bind-key -T copy-mode-vi 'v' send -X begin-selection
# custom
bind-key -T prefix C-b splitw -h -p 40 -b -c '#{pane_current_path}' nnn
# }}}
# {{{Plugins
# {{{tpm-usage
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin'
#
# prefix I install
# prefix alt-u uninstall
# prefix U upgrade
# }}}
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'tmux-plugins/tmux-prefix-highlight'
set -g @plugin 'sainnhe/tmux-net-speed'
set -g @plugin 'sainnhe/tmux-plugin-sysstat'
set -g @plugin 'sainnhe/tmux-fzf'
set -g @plugin 'sainnhe/tmux-translator'
set -g @plugin 'toddyamakawa/tmux-scratchpad'
run -b '~/.tmux/plugins/tpm/tpm'
# {{{tmux-plugin-sysstat
set -g @sysstat_cpu_view_tmpl '#[fg=magenta]C:#[default] #[fg=#{cpu.color}]#{cpu.pused}#[default]'
set -g @sysstat_mem_view_tmpl '#[fg=magenta]M:#[default] #[fg=#{mem.color}]#{mem.pused}#[default]'
set -g status-interval 3
# }}}
# {{{tmux-prefix-highlight
set -g @prefix_highlight_fg 'colour00'
set -g @prefix_highlight_bg 'red'
set -g @prefix_highlight_show_copy_mode 'on'
set -g @prefix_highlight_copy_mode_attr 'fg=colour00,bg=colour05,bold'
set -g @prefix_highlight_prefix_prompt 'PREFIX'
set -g @prefix_highlight_copy_prompt 'COPY'
# }}}
# {{{tmux-fzf
TMUX_FZF_LAUNCH_KEY="C-Space"
# }}}
# {{{tmux-translator
set -g @tmux-translator-from "en"
set -g @tmux-translator-to "zh"
set -g @tmux-translator-engine "bing" # "youdao|bing|ciba|google"
# }}}
# {{{tmux-scratchpad
set-option -g @scratch-command-key 'Tab'
# }}}
# }}}
# vim: set fdm=marker fmr={{{,}}}: