From 3d706977c8adc0a33123c4940b6860a0c8c9e8ec Mon Sep 17 00:00:00 2001 From: Gregory Pakosz Date: Sat, 11 Aug 2018 16:52:48 +0200 Subject: [PATCH] added tmux_conf_theme_terminal_title. Fixes #168 --- .tmux.conf | 22 ++++++++++++++++------ .tmux.conf.local | 10 ++++++++++ 2 files changed, 26 insertions(+), 6 deletions(-) diff --git a/.tmux.conf b/.tmux.conf index 7580d8c..2aa2624 100644 --- a/.tmux.conf +++ b/.tmux.conf @@ -32,14 +32,13 @@ bind r source-file ~/.tmux.conf \; display '~/.tmux.conf sourced' # -- display ------------------------------------------------------------------- -set -g base-index 1 # start windows numbering at 1 -setw -g pane-base-index 1 # make pane numbering consistent with windows +set -g base-index 1 # start windows numbering at 1 +setw -g pane-base-index 1 # make pane numbering consistent with windows -setw -g automatic-rename on # rename window to reflect current program -set -g renumber-windows on # renumber windows when a window is closed +setw -g automatic-rename on # rename window to reflect current program +set -g renumber-windows on # renumber windows when a window is closed -set -g set-titles on # set terminal title -set -g set-titles-string '#h ❐ #S ● #I #W' +set -g set-titles on # set terminal title set -g display-panes-time 800 # slightly longer pane indicators display time set -g display-time 1000 # slightly longer status messages display time @@ -775,6 +774,17 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration' # set -g status-left-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\ # set -g status-right-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" # +# tmux_conf_theme_terminal_title=${tmux_conf_theme_terminal_title:-'#h ❐ #S ● #I #W'} +# +# tmux_conf_theme_terminal_title=$(echo "$tmux_conf_theme_terminal_title" | 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 set -g set-titles-string "$tmux_conf_theme_terminal_title" +# # tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-'#8a8a8a'} # white # tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-'#080808'} # dark gray # tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-'none'} diff --git a/.tmux.conf.local b/.tmux.conf.local index cd16497..3abde50 100644 --- a/.tmux.conf.local +++ b/.tmux.conf.local @@ -90,6 +90,16 @@ tmux_conf_theme_status_fg='#8a8a8a' # light gray tmux_conf_theme_status_bg='#080808' # dark gray tmux_conf_theme_status_attr='none' +# terminal title +# - built-in variables are: +# - #{circled_window_index} +# - #{circled_session_name} +# - #{hostname} +# - #{hostname_ssh} +# - #{username} +# - #{username_ssh} +tmux_conf_theme_terminal_title='#h ❐ #S ● #I #W' + # window status style # - built-in variables are: # - #{circled_window_index}