Browse Source

Tmux: update status bar

ubuntu_ci
Ein Verne 4 years ago
parent
commit
1b9732e4a3
No known key found for this signature in database
GPG Key ID: 926634D64ACAD792
  1. 41
      tmux/.tmux.conf

41
tmux/.tmux.conf

@ -12,7 +12,7 @@ set -s focus-events on
# set -g prefix2 C-a # set -g prefix2 C-a
# bind C-a send-prefix -2 # bind C-a send-prefix -2
#set -q -g status-utf8 on set -q -g status-utf8 on
setw -q -g utf8 on setw -q -g utf8 on
# edit configuration # edit configuration
@ -119,10 +119,14 @@ bind C-l send-keys 'C-l'
set -g status-fg white set -g status-fg white
set -g status-bg colour234 # 底部状态背景 set -g status-bg colour234 # 底部状态背景
set -g status-interval 10 # redraw status line every 10 seconds
# 对齐方式 # 对齐方式
set-option -g status-justify centre set-option -g status-justify centre
# show session, windows, pane in left status bar
set -g status-left-length 40
set -g status-left-style bg=colour233,fg=colour243
set -g status-left '#[fg=colour233,bg=colour241,bold] #[fg=colour233,bg=colour245,bold] #I/#[fg=colour233,bg=colour245,bold]#P '
# fiddle with colors of inactive windows # fiddle with colors of inactive windows
# change color of active window # change color of active window
@ -131,21 +135,20 @@ set-option -g status-justify centre
# setw -g window-status-current-attr bright # setw -g window-status-current-attr bright
# set color of regular and active panes # set color of regular and active panes
# set -g pane-border-fg colour238 set -g pane-border-style fg=colour240,bg=black
# set -g pane-border-bg default set -g pane-active-border fg=green,bg=default
# set -g pane-active-border-fg green
# set -g pane-active-border-bg default
# set color of command line # color of status bar
#set -g message-fg white set -g status-style fg=green,bg=colour8
#set -g message-bg colour22 # color of message bar
#set -g message-attr bright set -g message-style fg=black,bold,bg=colour8
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
set -g status-right-length 50 set -g status-right-length 50
set -g status-right '#[fg=colour233,bg=colour241,bold] %d/%m #[fg=colour233,bg=colour245,bold] %H:%M:%S '
# 设置当前窗口格式及颜色 # 设置当前窗口格式及颜色
setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W " setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=colour8]#[bg=colour14] #W "
#setw -g window-status-current-bg colour0 #setw -g window-status-current-bg colour0
#setw -g window-status-current-fg colour11 #setw -g window-status-current-fg colour11
#setw -g window-status-current-attr dim #setw -g window-status-current-attr dim
@ -153,6 +156,7 @@ setw -g window-status-current-format "#[bg=brightmagenta]#[fg=colour8] #I #[fg=c
#setw -g window-status-bg colour234 #setw -g window-status-bg colour234
#setw -g window-status-attr dim #setw -g window-status-attr dim
# user defined # user defined
if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local' if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
@ -160,23 +164,32 @@ if '[ -f ~/.tmux.conf.local ]' 'source ~/.tmux.conf.local'
if "test ! -d ~/.tmux/plugins/tpm" \ if "test ! -d ~/.tmux/plugins/tpm" \
"run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'" "run 'git clone https://github.com/tmux-plugins/tpm ~/.tmux/plugins/tpm && ~/.tmux/plugins/tpm/bin/install_plugins'"
# see more http://einverne.github.io/post/2017/12/tmux-plugins.html
# to install plugins:
# add plugin and Prefix + I to install
# to update plugins:
# Prefix + U
# to remove plugins:
# Remove config and Prefix + alt + u
# List of plugins # List of plugins
set -g @plugin 'tmux-plugins/tpm' set -g @plugin 'tmux-plugins/tpm'
set -g @plugin 'tmux-plugins/tmux-sensible' set -g @plugin 'tmux-plugins/tmux-sensible'
set -g @plugin 'tmux-plugins/tmux-yank' set -g @plugin 'tmux-plugins/tmux-yank'
set -g @plugin 'tmux-plugins/tmux-open' set -g @plugin 'tmux-plugins/tmux-open'
set -g @plugin 'tmux-plugins/tmux-copycat'
set -g @plugin 'christoomey/vim-tmux-navigator' set -g @plugin 'christoomey/vim-tmux-navigator'
set -g @plugin 'tmux-plugins/tmux-resurrect' set -g @plugin 'tmux-plugins/tmux-resurrect'
set -g @plugin 'tmux-plugins/tmux-continuum'
# Other examples: # Other examples:
# set -g @plugin 'github_username/plugin_name' # set -g @plugin 'github_username/plugin_name'
# set -g @plugin '[email protected]/user/plugin' # set -g @plugin '[email protected]/user/plugin'
# set -g @plugin '[email protected]/user/plugin' # set -g @plugin '[email protected]/user/plugin'
set -g @continuum-restore 'on'
set -g @resurrect-capture-pane-contents 'on'
# Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf) # Initialize TMUX plugin manager (keep this line at the very bottom of tmux.conf)
run '~/.tmux/plugins/tpm/tpm' run '~/.tmux/plugins/tpm/tpm'
set -g @open-S 'https://www.google.com/search?q='

Loading…
Cancel
Save