forked from xingchensong/dotfiles
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f86017f
commit 37eb905
Showing
5 changed files
with
124 additions
and
7 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,114 @@ | ||
set -g default-terminal screen-256color | ||
# ------------------------------------------------------------------------------- | ||
# tmux-plug | ||
# ------------------------------------------------------------------------------- | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tpm' | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tmux-sensible' | ||
set -g @plugin 'https://github.com.cnpmjs.org/thewtex/tmux-mem-cpu-load' | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tmux-prefix-highlight' | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tmux-resurrect' | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tmux-continuum' | ||
set -g @plugin 'https://github.com.cnpmjs.org/schasse/tmux-jump' | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tmux-copycat' | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tmux-pain-control' | ||
set -g @plugin 'https://github.com.cnpmjs.org/tmux-plugins/tmux-net-speed' | ||
|
||
# tmux-prefix-highlight | ||
set -g @prefix_highlight_fg 'white' # default is 'colour231' | ||
set -g @prefix_highlight_bg 'blue' # default is 'colour04' | ||
set -g @prefix_highlight_show_copy_mode 'on' | ||
set -g @prefix_highlight_copy_mode_attr 'fg=black,bg=yellow,bold' # default is 'fg=default,bg=yellow' | ||
set -g @prefix_highlight_show_sync_mode 'on' | ||
set -g @prefix_highlight_sync_mode_attr 'fg=black,bg=green' # default is 'fg=default,bg=yellow' | ||
set -g @prefix_highlight_prefix_prompt 'Wait' | ||
set -g @prefix_highlight_copy_prompt 'Copy' | ||
set -g @prefix_highlight_sync_prompt 'Sync' | ||
set -g @prefix_highlight_empty_prompt ' ' # default is '' (empty char) | ||
set -g @prefix_highlight_empty_attr 'fg=default,bg=default' # default is 'fg=default,bg=default' | ||
set -g @prefix_highlight_empty_has_affixes 'on' # default is 'off' | ||
set -g @prefix_highlight_empty_prompt '@SXC' | ||
set -g @prefix_highlight_output_prefix '< ' | ||
set -g @prefix_highlight_output_suffix ' >' | ||
# tmux-resurrect | ||
# 修改会话数据的保持路径,此处不能使用除了$HOME, $HOSTNAME, ~之外的环境变量 | ||
set -g @resurrect-dir '$HOME/.tmux/resurrect' | ||
set -g @resurrect-capture-pane-contents 'on' | ||
# tmux-continuum | ||
set -g @continuum-restore 'on' | ||
set -g @continuum-boot 'on' | ||
set -g @continuum-save-interval '0' | ||
# tmux-jump | ||
set -g @jump-bg-color '\e[0m\e[90m' | ||
set -g @jump-fg-color '\e[1m\e[31m' | ||
# tmux-net-speed | ||
set -g @net_speed_format "D:%8s U:%8s" | ||
|
||
# ------------------------------------------------------------------------------- | ||
# Common | ||
# ------------------------------------------------------------------------------- | ||
# terminal color | ||
set -g default-terminal xterm-256color | ||
set-option -ga terminal-overrides ",*256col*:Tc" | ||
# keys | ||
setw -g xterm-keys on | ||
setw -g mode-keys vi | ||
# address vim mode switching delay (http://superuser.com/a/252717/65504) | ||
set -s escape-time 0 | ||
# increase scrollback buffer size | ||
set -g history-limit 50000 | ||
# tmux messages are displayed for 4 seconds | ||
set -g display-time 4000 | ||
# refresh 'status-left' and 'status-right' more often | ||
set -g status-interval 5 | ||
# focus events enabled for terminals that support them | ||
set -g focus-events on | ||
# super useful when using "grouped sessions" and multi-monitor setup | ||
setw -g aggressive-resize on | ||
# Status bar | ||
set -g status on | ||
set -g status-left-length 120 | ||
set -g status-right-length 120 | ||
set -g set-titles on | ||
set -g set-titles-string "[#S] #I:#W" | ||
set -g status-bg "#657b83" | ||
set -g status-fg white | ||
set-option -g status-justify centre | ||
set -g status-right " | #{net_speed} | #($TMUX_PLUGIN_MANAGER_PATH/tmux-mem-cpu-load/tmux-mem-cpu-load --interval 2 --cpu-mode 1)" | ||
set -g status-left '#[fg=cyan][#{session_name}] #{prefix_highlight} | #[fg=cyan,bg=default,nobright]%a-%Y-%m-%d-%H:%M:%S #[fg=default,noblink]| Continuum status: #{continuum_status} | ' | ||
# window | ||
setw -g automatic-rename off | ||
set-option -g allow-rename off | ||
set-window-option -g window-style default | ||
set-window-option -g clock-mode-colour black | ||
set-window-option -g clock-mode-style 24 | ||
set-window-option -g monitor-activity on | ||
set-window-option -g visual-bell off | ||
# pane | ||
set-option -g display-panes-active-colour blue | ||
set-option -g display-panes-colour brightred | ||
# message style | ||
set-option -g message-style bg=black,fg=default,noreverse | ||
# bell | ||
set -g bell-action none | ||
set-window-option -g bell-action none | ||
|
||
# ------------------------------------------------------------------------------- | ||
# Bind Keys | ||
# ------------------------------------------------------------------------------- | ||
# easier and faster switching between next/prev window | ||
bind C-m previous-window | ||
bind C-n next-window | ||
# source .tmux.conf as suggested in `man tmux` | ||
bind r source-file ~/.tmux.conf \; display-message "Config reloaded.." | ||
# vim-mode copy and paste | ||
bind Escape copy-mode # 绑定esc键为进入复制模式 | ||
bind-key -T copy-mode-vi 'v' send -X begin-selection | ||
bind-key -T copy-mode-vi 'y' send -X copy-selection-and-cancel | ||
bind p pasteb # 绑定p键为粘贴文本 | ||
# Killer | ||
bind x kill-pane | ||
bind X kill-window | ||
# open a new window in the current directory | ||
bind C new-window -c "#{pane_current_path}" -n "shell" | ||
|
||
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) | ||
run '~/.tmux/plugins/tpm/tpm' |
This file contains 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
This file contains 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