dotfiles/dot_tmux.conf

92 lines
4.4 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Tmux Basic Configure
set -g mouse on
set -g mode-keys vi
# 讓終端支援 Truecolor
set-option -ga terminal-overrides ',*:Tc'
# == TPM Configure ============================================================
# List of plugins
set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible'
# Other examples:
# set -g @plugin 'github_username/plugin_name'
# set -g @plugin 'github_username/plugin_name#branch'
# set -g @plugin 'git@github.com:user/plugin'
# set -g @plugin 'git@bitbucket.com:user/plugin'
# set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'aacebedo/tmux-mode-indicator'
# == Plugin Configure =========================================================
# ---- tmux-mode-indicator ----------------------------------------------------
# prompt to display when tmux prefix key is pressed
set -g @mode_indicator_prefix_prompt ' PREFIX '
# prompt to display when tmux is in copy mode
set -g @mode_indicator_copy_prompt " COPY "
# prompt to display when tmux has synchronized panes
set -g @mode_indicator_sync_prompt ' SYNC '
# prompt to display when tmux is in normal mode
set -g @mode_indicator_empty_prompt ' TERM '
# add an element at the start of the indicator in <mode> mode (replace it with prefix, copy, sync or empty)
set -g @mode_indicator_prefix_end_prompt ''
set -g @mode_indicator_copy_end_prompt ''
set -g @mode_indicator_sync_end_prompt ''
set -g @mode_indicator_empty_end_prompt ''
# style values for prefix prompt
set -g @mode_indicator_prefix_mode_style 'bg=green,fg=black'
# style values for copy prompt
set -g @mode_indicator_copy_mode_style 'bg=violet,fg=black'
# style values for sync prompt
set -g @mode_indicator_sync_mode_style 'bg=red,fg=black'
# style values for empty prompt
set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black'
# stàle the element at the start of the indicator in <mode> mode (replace it with prefix, copy, sync or empty)
set -g @mode_indicator_prefix_mode_end_style 'fg=green,bg=yellow'
set -g @mode_indicator_copy_mode_end_style 'fg=violet,bg=yellow'
set -g @mode_indicator_sync_mode_end_style 'fg=red,bg=yellow'
set -g @mode_indicator_empty_mode_end_style 'fg=cyan,bg=yellow'
# == StatusBar Configure ======================================================
# tmux show-options -g | grep status-left
set -g status-interval 1
set -g status-keys vi
# set -g status-justify centre
set -g status-left-length 100
set -g status-right-length 100
set -g status-bg default
set -g status-fg white
set -g status-style "bg=black,fg=white"
set -g status-left "#{tmux_mode_indicator}#[fg=black,bg=yellow] [#{session_name}] #[fg=yellow,bg=default] "
set -g status-right "#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}\"#{=21:pane_title}\" %H:%M %d-%b-%y"
# set -g status-left '#{tmux_mode_indicator}#[fg=colour240]#(whoami)'
# set -g status-left '#{tmux_mode_indicator}#[fg=colour240]#[fg=colour255,bg=colour240] #(whoami) #[fg=colour240,bg=default]'
# set -g status-left "#[bg=colour240]aaaaa #[fg=colour240]#[fg=colour255,bg=colour240] #(whoami) #[fg=black,bg=colour240]"
# set -g status-left "#[bg=colour240]aaaaa #[fg=colour240]#[fg=colour255,bg=colour240] #(whoami) #[fg=black,bg=colour240]"
# set -g status-right "#(date '+%Y-%m-%d %H:%M') #[fg=colour240]#[fg=white,bg=colour240] #(uptime | cut -d ',' -f 1)"
# == StatusBar window Configure ===============================================
# set -g window-status-activity-style "reverse"
# set -g window-status-bell-style "reverse"
# set -g window-status-current-format "#I:#W#F"
# set -g window-status-current-style "default"
# set -g window-status-format "#I:#W#F"
# set -g window-status-last-style "default"
# set -g window-status-separator " "
# set -g window-status-style "default"
set -wg window-status-format "#[fg=gray,bg=default]#[bg=default,fg=gray] #I:#W#{?window_flags,#{window_flags}, } #[fg=gray,bg=default]"
set -wg window-status-current-format "#[fg=blue,bg=default]#[bg=blue,fg=white] #I:#W#{?window_flags,#{window_flags}, } #[fg=blue,bg=default]" # 状态栏当前窗口名称格式(#I序号#w窗口名 称,#F间隔符)
# set -wg window-status-current-style "fg=#d7fcaf,bg=#60875f" # 状态栏当前窗口名称的样式
set -wg window-status-separator " " # 状态栏窗口名称之间的间隔
# == TPM Footer =------========================================================
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm'