feat tmux: add uptime

This commit is contained in:
Yuan Chiu 2025-06-01 21:28:23 +08:00
parent cb38b810e3
commit c9f6e56d3b
Signed by: yuan
GPG Key ID: 50FBE4156404B98D

View File

@ -17,6 +17,9 @@ set -g @plugin 'tmux-plugins/tmux-sensible'
# set -g @plugin 'git@bitbucket.com:user/plugin' # set -g @plugin 'git@bitbucket.com:user/plugin'
# set -g @plugin 'MunifTanjim/tmux-mode-indicator' # set -g @plugin 'MunifTanjim/tmux-mode-indicator'
set -g @plugin 'aacebedo/tmux-mode-indicator' set -g @plugin 'aacebedo/tmux-mode-indicator'
set -g @plugin 'robhurring/tmux-uptime'
set -g @plugin 'tassaron/tmux-df'
set -g @plugin 'anghootys/tmux-ip-address'
# == Plugin Configure ========================================================= # == Plugin Configure =========================================================
@ -46,10 +49,10 @@ set -g @mode_indicator_sync_mode_style 'bg=red,fg=black,bold'
set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black,bold' set -g @mode_indicator_empty_mode_style 'bg=cyan,fg=black,bold'
# stàle the element at the start of the indicator in <mode> mode (replace it with prefix, copy, sync or empty) # 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_prefix_mode_end_style 'fg=green,bg=pink'
set -g @mode_indicator_copy_mode_end_style 'fg=violet,bg=yellow' set -g @mode_indicator_copy_mode_end_style 'fg=violet,bg=pink'
set -g @mode_indicator_sync_mode_end_style 'fg=red,bg=yellow' set -g @mode_indicator_sync_mode_end_style 'fg=red,bg=pink'
set -g @mode_indicator_empty_mode_end_style 'fg=cyan,bg=yellow' set -g @mode_indicator_empty_mode_end_style 'fg=cyan,bg=pink'
# == StatusBar Configure ====================================================== # == StatusBar Configure ======================================================
# tmux show-options -g | grep status-left # tmux show-options -g | grep status-left
@ -62,7 +65,7 @@ set -g status-right-length 100
set -g status-bg default set -g status-bg default
set -g status-fg white set -g status-fg white
set -g status-style "bg=black,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-left "#{tmux_mode_indicator}#[fg=black,bg=pink] ↑ #{uptime} #[fg=pink,bg=yellow]#[fg=black,bg=yellow] ❐ #{session_name} #[fg=yellow,bg=default] "
set -g status-right "#[fg=gray,bg=default] #[fg=yellow,bg=default]#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}\"#{=21:pane_title}\" #[fg=white,bg=black]#[bg=white,fg=black] %H:%M:%S  " set -g status-right "#[fg=gray,bg=default] #[fg=yellow,bg=default]#{?window_bigger,[#{window_offset_x}#,#{window_offset_y}] ,}\"#{=21:pane_title}\" #[fg=white,bg=black]#[bg=white,fg=black] %H:%M:%S  "
# set -g status-left '#{tmux_mode_indicator}#[fg=colour240]#(whoami)' # 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 '#{tmux_mode_indicator}#[fg=colour240]#[fg=colour255,bg=colour240] #(whoami) #[fg=colour240,bg=default]'