1
0
Fork 0
mirror of synced 2024-12-22 06:41:07 -05:00

made window titles support additional variables. Fixes #178

tmux_conf_theme_window_status_format and tmux_conf_theme_window_status_current_format
variables now understand:
  - #{circled_session_name}
  - #{hostname}
  - #{hostname_ssh}
  - #{username}
  - #{username_ssh}
This commit is contained in:
Gregory Pakosz 2018-08-11 16:54:04 +02:00
parent 3d706977c8
commit b3a9f75ea6
2 changed files with 24 additions and 2 deletions

View file

@ -800,8 +800,20 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg]$tmux_conf_theme_left_separator_main#[fg=default,bg=default,default] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_left_separator_main" # tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_window_status_current_bg]$tmux_conf_theme_left_separator_main#[fg=default,bg=default,default] $tmux_conf_theme_window_status_current_format #[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_left_separator_main"
# fi # fi
# #
# tmux_conf_theme_window_status_format=$(echo "$tmux_conf_theme_window_status_format" | sed 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #I)%g') # tmux_conf_theme_window_status_format=$(echo "$tmux_conf_theme_window_status_format" | sed \
# tmux_conf_theme_window_status_current_format=$(echo "$tmux_conf_theme_window_status_current_format" | sed 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #I)%g') # -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g')
# tmux_conf_theme_window_status_current_format=$(echo "$tmux_conf_theme_window_status_current_format" | sed \
# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled_digit #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} false #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_tty} true #D)%g')
# #
# tmux setw -g window-status-style "fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr" \;\ # tmux setw -g window-status-style "fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr" \;\
# setw -g window-status-format "$tmux_conf_theme_window_status_format" \;\ # setw -g window-status-format "$tmux_conf_theme_window_status_format" \;\

View file

@ -103,6 +103,11 @@ tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W'
# window status style # window status style
# - built-in variables are: # - built-in variables are:
# - #{circled_window_index} # - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_window_status_fg='#8a8a8a' # light gray tmux_conf_theme_window_status_fg='#8a8a8a' # light gray
tmux_conf_theme_window_status_bg='#080808' # dark gray tmux_conf_theme_window_status_bg='#080808' # dark gray
tmux_conf_theme_window_status_attr='none' tmux_conf_theme_window_status_attr='none'
@ -113,6 +118,11 @@ tmux_conf_theme_window_status_format='#I #W'
# window current status style # window current status style
# - built-in variables are: # - built-in variables are:
# - #{circled_window_index} # - #{circled_window_index}
# - #{circled_session_name}
# - #{hostname}
# - #{hostname_ssh}
# - #{username}
# - #{username_ssh}
tmux_conf_theme_window_status_current_fg='#000000' # black tmux_conf_theme_window_status_current_fg='#000000' # black
tmux_conf_theme_window_status_current_bg='#00afff' # light blue tmux_conf_theme_window_status_current_bg='#00afff' # light blue
tmux_conf_theme_window_status_current_attr='bold' tmux_conf_theme_window_status_current_attr='bold'