Last active
March 26, 2021 01:34
-
-
Save imzhi/cb559c28fd0903c01dc59762633319b6 to your computer and use it in GitHub Desktop.
新的.tmux.conf(精简)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List of plugins | |
| set -g @plugin 'tmux-plugins/tpm' | |
| set -g @plugin 'tmux-plugins/tmux-sensible' | |
| set -g @plugin 'tmux-plugins/tmux-sidebar' | |
| set -g @plugin 'tmux-plugins/tmux-net-speed' | |
| set -g @plugin 'tmux-plugins/tmux-prefix-highlight' | |
| set -g @plugin 'tmux-plugins/tmux-pain-control' | |
| set -g @plugin 'tmux-plugins/tmux-cpu' | |
| set -g @plugin 'tmux-plugins/tmux-resurrect' | |
| set -g @plugin 'tmux-plugins/tmux-continuum' | |
| set -g @plugin 'tmux-plugins/tmux-yank' | |
| set-option -g prefix C-a | |
| unbind-key C-b | |
| # Status Bar | |
| set-option -g status-interval 1 | |
| set-option -g status-style bg=black | |
| set-option -g status-style fg=white | |
| set -g status-left '#[fg=green]#H #[default]' | |
| set -g status-right '#{prefix_highlight} CPU: #{cpu_percentage} RAM: #{ram_percentage} | %a %H:%M:%S #[fg=cyan]%Y-%m-%d' | |
| set -g status-left-length 20 | |
| set -g status-right-length 60 | |
| set-option -g pane-active-border-style fg=yellow | |
| set-option -g pane-border-style fg=cyan | |
| set-option -g default-terminal screen-256color | |
| setw -g mode-keys vi | |
| bind-key [ copy-mode | |
| bind-key ] paste-buffer | |
| # Setup 'v' to begin selection as in Vim | |
| bind-key -T copy-mode-vi v send -X begin-selection | |
| # Restoring pane contents | |
| set -g @resurrect-capture-pane-contents 'on' | |
| # Restoring vim sessions | |
| set -g @resurrect-strategy-vim 'session' | |
| # Restoring additional programs | |
| set -g @resurrect-processes 'ssh mysql redis-server npm sqlite3 psql' | |
| # Automatic restore | |
| set -g @continuum-restore 'on' | |
| # 每隔15mins备份一次 | |
| set -g @continuum-save-interval '1440' | |
| # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | |
| run '~/.tmux/plugins/tpm/tpm' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
要先装好 https://github.com/tmux-plugins/tpm,再使用 prefix + I 安装其余 tmux 插件,即可。
prefix + I 安装其余 tmux 插件有可能会失去响应,直接用 Git 命令手动安装各个插件到
~/.tmux/plugins目录里。