1
0
Fork 0
mirror of synced 2024-12-04 14:45:38 -05:00

Compare commits

...

4 commits

3 changed files with 418 additions and 440 deletions

View file

@ -109,43 +109,16 @@ bind U run "cut -c3- ~/.tmux.conf | sh -s _urlview #{pane_id}"
bind F run "cut -c3- ~/.tmux.conf | sh -s _fpp #{pane_id} #{pane_current_path}"
# -- list choice (tmux < 2.4) --------------------------------------------------
# vi-choice is gone in tmux >= 2.4
run -b 'tmux bind -t vi-choice h tree-collapse 2> /dev/null || true'
run -b 'tmux bind -t vi-choice l tree-expand 2> /dev/null || true'
run -b 'tmux bind -t vi-choice K start-of-list 2> /dev/null || true'
run -b 'tmux bind -t vi-choice J end-of-list 2> /dev/null || true'
run -b 'tmux bind -t vi-choice H tree-collapse-all 2> /dev/null || true'
run -b 'tmux bind -t vi-choice L tree-expand-all 2> /dev/null || true'
run -b 'tmux bind -t vi-choice Escape cancel 2> /dev/null || true'
# -- edit mode (tmux < 2.4) ----------------------------------------------------
# vi-edit is gone in tmux >= 2.4
run -b 'tmux bind -ct vi-edit H start-of-line 2> /dev/null || true'
run -b 'tmux bind -ct vi-edit L end-of-line 2> /dev/null || true'
run -b 'tmux bind -ct vi-edit q cancel 2> /dev/null || true'
run -b 'tmux bind -ct vi-edit Escape cancel 2> /dev/null || true'
# -- copy mode -----------------------------------------------------------------
bind Enter copy-mode # enter copy mode
run -b 'tmux bind -t vi-copy v begin-selection 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi v send -X begin-selection 2> /dev/null || true'
run -b 'tmux bind -t vi-copy C-v rectangle-toggle 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi C-v send -X rectangle-toggle 2> /dev/null || true'
run -b 'tmux bind -t vi-copy y copy-selection 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi y send -X copy-selection-and-cancel 2> /dev/null || true'
run -b 'tmux bind -t vi-copy Escape cancel 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi Escape send -X cancel 2> /dev/null || true'
run -b 'tmux bind -t vi-copy H start-of-line 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi H send -X start-of-line 2> /dev/null || true'
run -b 'tmux bind -t vi-copy L end-of-line 2> /dev/null || true'
run -b 'tmux bind -T copy-mode-vi L send -X end-of-line 2> /dev/null || true'
bind -T copy-mode-vi v send -X begin-selection
bind -T copy-mode-vi C-v send -X rectangle-toggle
bind -T copy-mode-vi y send -X copy-selection-and-cancel
bind -T copy-mode-vi Escape send -X cancel
bind -T copy-mode-vi H send -X start-of-line
bind -T copy-mode-vi L send -X end-of-line
# copy to X11 clipboard
if -b 'command -v xsel > /dev/null 2>&1' 'bind y run -b "tmux save-buffer - | xsel -i -b"'
@ -498,8 +471,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
#
# battery_percentage="$(awk "BEGIN { printf \"%.0f%%\", ($charge) * 100 }")"
#
# tmux set -g '@battery_status' "$battery_status" \;\
# set -g '@battery_bar' "$battery_bar" \;\
# tmux set -g '@battery_bar' "$battery_bar" \;\
# set -g '@battery_hbar' "$battery_hbar" \;\
# set -g '@battery_vbar' "$battery_vbar" \;\
# set -g '@battery_percentage' "$battery_percentage"
@ -849,382 +821,409 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# }
#
# _apply_theme() {
# tmux_conf_theme=${tmux_conf_theme:-enabled}
# if ! _is_disabled "$tmux_conf_theme"; then
#
# # -- default theme -----------------------------------------------------
# # -- default theme -------------------------------------------------------
#
# tmux_conf_theme_colour_1=${tmux_conf_theme_colour_1:-#080808} # dark gray
# tmux_conf_theme_colour_2=${tmux_conf_theme_colour_2:-#303030} # gray
# tmux_conf_theme_colour_3=${tmux_conf_theme_colour_3:-#8a8a8a} # light gray
# tmux_conf_theme_colour_4=${tmux_conf_theme_colour_4:-#00afff} # light blue
# tmux_conf_theme_colour_5=${tmux_conf_theme_colour_5:-#ffff00} # yellow
# tmux_conf_theme_colour_6=${tmux_conf_theme_colour_6:-#080808} # dark gray
# tmux_conf_theme_colour_7=${tmux_conf_theme_colour_7:-#e4e4e4} # white
# tmux_conf_theme_colour_8=${tmux_conf_theme_colour_8:-#080808} # dark gray
# tmux_conf_theme_colour_9=${tmux_conf_theme_colour_9:-#ffff00} # yellow
# tmux_conf_theme_colour_10=${tmux_conf_theme_colour_10:-#ff00af} # pink
# tmux_conf_theme_colour_11=${tmux_conf_theme_colour_11:-#5fff00} # green
# tmux_conf_theme_colour_12=${tmux_conf_theme_colour_12:-#8a8a8a} # light gray
# tmux_conf_theme_colour_13=${tmux_conf_theme_colour_13:-#e4e4e4} # white
# tmux_conf_theme_colour_14=${tmux_conf_theme_colour_14:-#080808} # dark gray
# tmux_conf_theme_colour_15=${tmux_conf_theme_colour_15:-#080808} # dark gray
# tmux_conf_theme_colour_16=${tmux_conf_theme_colour_16:-#d70000} # red
# tmux_conf_theme_colour_17=${tmux_conf_theme_colour_17:-#e4e4e4} # white
# tmux_conf_theme_colour_1=${tmux_conf_theme_colour_1:-#080808} # dark gray
# tmux_conf_theme_colour_2=${tmux_conf_theme_colour_2:-#303030} # gray
# tmux_conf_theme_colour_3=${tmux_conf_theme_colour_3:-#8a8a8a} # light gray
# tmux_conf_theme_colour_4=${tmux_conf_theme_colour_4:-#00afff} # light blue
# tmux_conf_theme_colour_5=${tmux_conf_theme_colour_5:-#ffff00} # yellow
# tmux_conf_theme_colour_6=${tmux_conf_theme_colour_6:-#080808} # dark gray
# tmux_conf_theme_colour_7=${tmux_conf_theme_colour_7:-#e4e4e4} # white
# tmux_conf_theme_colour_8=${tmux_conf_theme_colour_8:-#080808} # dark gray
# tmux_conf_theme_colour_9=${tmux_conf_theme_colour_9:-#ffff00} # yellow
# tmux_conf_theme_colour_10=${tmux_conf_theme_colour_10:-#ff00af} # pink
# tmux_conf_theme_colour_11=${tmux_conf_theme_colour_11:-#5fff00} # green
# tmux_conf_theme_colour_12=${tmux_conf_theme_colour_12:-#8a8a8a} # light gray
# tmux_conf_theme_colour_13=${tmux_conf_theme_colour_13:-#e4e4e4} # white
# tmux_conf_theme_colour_14=${tmux_conf_theme_colour_14:-#080808} # dark gray
# tmux_conf_theme_colour_15=${tmux_conf_theme_colour_15:-#080808} # dark gray
# tmux_conf_theme_colour_16=${tmux_conf_theme_colour_16:-#d70000} # red
# tmux_conf_theme_colour_17=${tmux_conf_theme_colour_17:-#e4e4e4} # white
#
# # -- panes -------------------------------------------------------------
# # -- panes ---------------------------------------------------------------
#
# tmux_conf_theme_window_fg=${tmux_conf_theme_window_fg:-default}
# tmux_conf_theme_window_bg=${tmux_conf_theme_window_bg:-default}
# tmux_conf_theme_highlight_focused_pane=${tmux_conf_theme_highlight_focused_pane:-false}
# tmux_conf_theme_focused_pane_fg=${tmux_conf_theme_focused_pane_fg:-default}
# tmux_conf_theme_focused_pane_bg=${tmux_conf_theme_focused_pane_bg:-$tmux_conf_theme_colour_2}
# tmux_conf_theme_window_fg=${tmux_conf_theme_window_fg:-default}
# tmux_conf_theme_window_bg=${tmux_conf_theme_window_bg:-default}
# tmux_conf_theme_highlight_focused_pane=${tmux_conf_theme_highlight_focused_pane:-false}
# tmux_conf_theme_focused_pane_fg=${tmux_conf_theme_focused_pane_fg:-default}
# tmux_conf_theme_focused_pane_bg=${tmux_conf_theme_focused_pane_bg:-$tmux_conf_theme_colour_2}
#
# window_style="fg=$tmux_conf_theme_window_fg,bg=$tmux_conf_theme_window_bg"
# if _is_true "$tmux_conf_theme_highlight_focused_pane"; then
# window_active_style="fg=$tmux_conf_theme_focused_pane_fg,bg=$tmux_conf_theme_focused_pane_bg"
# else
# window_active_style="default"
# fi
#
# tmux_conf_theme_pane_border_style=${tmux_conf_theme_pane_border_style:-thin}
# tmux_conf_theme_pane_border=${tmux_conf_theme_pane_border:-$tmux_conf_theme_colour_2}
# tmux_conf_theme_pane_active_border=${tmux_conf_theme_pane_active_border:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-$tmux_conf_theme_pane_border}
# tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-$tmux_conf_theme_pane_active_border}
# case "$tmux_conf_theme_pane_border_style" in
# fat)
# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-$tmux_conf_theme_pane_border_fg}
# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-$tmux_conf_theme_pane_active_border_fg}
# ;;
# thin|*)
# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-default}
# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-default}
# ;;
# esac
#
# tmux_conf_theme_pane_indicator=${tmux_conf_theme_pane_indicator:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_pane_active_indicator=${tmux_conf_theme_pane_active_indicator:-$tmux_conf_theme_colour_4}
#
# # -- status line -------------------------------------------------------
#
# tmux_conf_theme_left_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_main-}")
# tmux_conf_theme_left_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_sub-|}")
# tmux_conf_theme_right_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_main-}")
# tmux_conf_theme_right_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_sub-|}")
#
# tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-bold}
#
# tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_message_command_attr=${tmux_conf_theme_message_command_attr:-bold}
#
# tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-bold}
#
# tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-$tmux_conf_theme_colour_3}
# tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_status_attr=${tmux_conf_theme_status_attr:-none}
#
# 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 #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \
# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \
# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g')
#
# tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-$tmux_conf_theme_colour_3}
# tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-none}
# tmux_conf_theme_window_status_format=${tmux_conf_theme_window_status_format:-#I #W}
#
# tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_window_status_current_attr=${tmux_conf_theme_window_status_current_attr:-bold}
# tmux_conf_theme_window_status_current_format=${tmux_conf_theme_window_status_current_format:-#I #W}
#
# tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-default}
# tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-default}
# tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-underscore}
#
# tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-default}
# tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-blink,bold}
#
# tmux_conf_theme_window_status_last_fg=${tmux_conf_theme_window_status_last_fg:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_window_status_last_bg=${tmux_conf_theme_window_status_last_bg:-default}
# tmux_conf_theme_window_status_last_attr=${tmux_conf_theme_window_status_last_attr:-none}
#
# if [ x"$tmux_conf_theme_window_status_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bg" = x"default" ]; then
# spacer=''
# spacer_current=' '
# else
# spacer=' '
# spacer_current=' '
# fi
# if [ x"$tmux_conf_theme_window_status_last_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_last_bg" = x"default" ] ; then
# spacer_last=''
# else
# spacer_last=' '
# fi
# if [ x"$tmux_conf_theme_window_status_activity_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_activity_bg" = x"default" ] ; then
# spacer_activity=''
# spacer_last_activity="$spacer_last"
# else
# spacer_activity=' '
# spacer_last_activity=' '
# fi
# if [ x"$tmux_conf_theme_window_status_bell_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bell_bg" = x"default" ] ; then
# spacer_bell=''
# spacer_last_bell="$spacer_last"
# spacer_activity_bell="$spacer_activity"
# spacer_last_activity_bell="$spacer_last_activity"
# else
# spacer_bell=' '
# spacer_last_bell=' '
# spacer_activity_bell=' '
# spacer_last_activity_bell=' '
# fi
# spacer="#{?window_last_flag,#{?window_activity_flag,#{?window_bell_flag,$spacer_last_activity_bell,$spacer_last_activity},#{?window_bell_flag,$spacer_last_bell,$spacer_last}},#{?window_activity_flag,#{?window_bell_flag,$spacer_activity_bell,$spacer_activity},#{?window_bell_flag,$spacer_bell,$spacer}}}"
# if [ x"$(tmux show -g -v status-justify)" = x"right" ]; then
# if [ -z "$tmux_conf_theme_right_separator_main" ]; then
# window_status_separator=' '
# window_style="fg=$tmux_conf_theme_window_fg,bg=$tmux_conf_theme_window_bg"
# if _is_true "$tmux_conf_theme_highlight_focused_pane"; then
# window_active_style="fg=$tmux_conf_theme_focused_pane_fg,bg=$tmux_conf_theme_focused_pane_bg"
# else
# window_status_separator=''
# fi
# tmux_conf_theme_window_status_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag?,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#[none]$tmux_conf_theme_right_separator_main"
# 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_right_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_right_separator_main"
# else
# if [ -z "$tmux_conf_theme_left_separator_main" ]; then
# window_status_separator=' '
# else
# window_status_separator=''
# fi
# tmux_conf_theme_window_status_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if /!default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main"
# tmux_conf_theme_window_status_current_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg]$tmux_conf_theme_left_separator_main"
# fi
#
# tmux_conf_theme_window_status_format=$(echo "$tmux_conf_theme_window_status_format" | sed \
# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \
# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \
# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #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 #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \
# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \
# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g')
#
# # -- indicators
#
# tmux_conf_theme_pairing=${tmux_conf_theme_pairing:-⚇} # U+2687
# tmux_conf_theme_pairing_fg=${tmux_conf_theme_pairing_fg:-none}
# tmux_conf_theme_pairing_bg=${tmux_conf_theme_pairing_bg:-none}
# tmux_conf_theme_pairing_attr=${tmux_conf_theme_pairing_attr:-none}
#
# tmux_conf_theme_prefix=${tmux_conf_theme_prefix:-⌨} # U+2328
# tmux_conf_theme_prefix_fg=${tmux_conf_theme_prefix_fg:-none}
# tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-none}
# tmux_conf_theme_prefix_attr=${tmux_conf_theme_prefix_attr:-none}
#
# tmux_conf_theme_mouse=${tmux_conf_theme_mouse:-↗} # U+2197
# tmux_conf_theme_mouse_fg=${tmux_conf_theme_mouse_fg:-none}
# tmux_conf_theme_mouse_bg=${tmux_conf_theme_mouse_bg:-none}
# tmux_conf_theme_mouse_attr=${tmux_conf_theme_mouse_attr:-none}
#
# tmux_conf_theme_root=${tmux_conf_theme_root:-!}
# tmux_conf_theme_root_fg=${tmux_conf_theme_root_fg:-none}
# tmux_conf_theme_root_bg=${tmux_conf_theme_root_bg:-none}
# tmux_conf_theme_root_attr=${tmux_conf_theme_root_attr:-bold,blink}
#
# tmux_conf_theme_synchronized=${tmux_conf_theme_synchronized:-⚏} # U+268F
# tmux_conf_theme_synchronized_fg=${tmux_conf_theme_synchronized_fg:-none}
# tmux_conf_theme_synchronized_bg=${tmux_conf_theme_synchronized_bg:-none}
# tmux_conf_theme_synchronized_attr=${tmux_conf_theme_synchronized_attr:-none}
#
# # -- status-left style
#
# tmux_conf_theme_status_left=${tmux_conf_theme_status_left-' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '}
# tmux_conf_theme_status_left_fg=${tmux_conf_theme_status_left_fg:-$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8}
# tmux_conf_theme_status_left_bg=${tmux_conf_theme_status_left_bg:-$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11}
# tmux_conf_theme_status_left_attr=${tmux_conf_theme_status_left_attr:-bold,none,none}
#
# if [ -n "$tmux_conf_theme_status_left" ]; then
# status_left=$(echo "$tmux_conf_theme_status_left" | sed \
# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \
# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g')
#
# if [ -n "$(tmux display -p '#{version}')" ]; then
# status_left=$(echo "$status_left" | sed \
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
# else
# status_left=$(echo "$status_left" | sed \
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_pid} #{b:pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
# window_active_style="default"
# fi
#
# status_left=$(printf '%s' "$status_left" | awk \
# -v status_bg="$tmux_conf_theme_status_bg" \
# -v fg_="$tmux_conf_theme_status_left_fg" \
# -v bg_="$tmux_conf_theme_status_left_bg" \
# -v attr_="$tmux_conf_theme_status_left_attr" \
# -v mainsep="$tmux_conf_theme_left_separator_main" \
# -v subsep="$tmux_conf_theme_left_separator_sub" '
# function subsplit(s, l, i, a, r)
# {
# l = split(s, a, ",")
# for (i = 1; i <= l; ++i)
# tmux_conf_theme_pane_border_style=${tmux_conf_theme_pane_border_style:-thin}
# tmux_conf_theme_pane_border=${tmux_conf_theme_pane_border:-$tmux_conf_theme_colour_2}
# tmux_conf_theme_pane_active_border=${tmux_conf_theme_pane_active_border:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_pane_border_fg=${tmux_conf_theme_pane_border_fg:-$tmux_conf_theme_pane_border}
# tmux_conf_theme_pane_active_border_fg=${tmux_conf_theme_pane_active_border_fg:-$tmux_conf_theme_pane_active_border}
# case "$tmux_conf_theme_pane_border_style" in
# fat)
# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-$tmux_conf_theme_pane_border_fg}
# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-$tmux_conf_theme_pane_active_border_fg}
# ;;
# thin|*)
# tmux_conf_theme_pane_border_bg=${tmux_conf_theme_pane_border_bg:-default}
# tmux_conf_theme_pane_active_border_bg=${tmux_conf_theme_pane_active_border_bg:-default}
# ;;
# esac
#
# tmux_conf_theme_pane_indicator=${tmux_conf_theme_pane_indicator:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_pane_active_indicator=${tmux_conf_theme_pane_active_indicator:-$tmux_conf_theme_colour_4}
#
# # -- status line ---------------------------------------------------------
#
# tmux_conf_theme_left_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_main-}")
# tmux_conf_theme_left_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_left_separator_sub-|}")
# tmux_conf_theme_right_separator_main=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_main-}")
# tmux_conf_theme_right_separator_sub=$(_decode_unicode_escapes "${tmux_conf_theme_right_separator_sub-|}")
#
# tmux_conf_theme_message_fg=${tmux_conf_theme_message_fg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_message_bg=${tmux_conf_theme_message_bg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_message_attr=${tmux_conf_theme_message_attr:-bold}
#
# tmux_conf_theme_message_command_fg=${tmux_conf_theme_message_command_fg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_message_command_bg=${tmux_conf_theme_message_command_bg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_message_command_attr=${tmux_conf_theme_message_command_attr:-bold}
#
# tmux_conf_theme_mode_fg=${tmux_conf_theme_mode_fg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_mode_bg=${tmux_conf_theme_mode_bg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_mode_attr=${tmux_conf_theme_mode_attr:-bold}
#
# tmux_conf_theme_status_fg=${tmux_conf_theme_status_fg:-$tmux_conf_theme_colour_3}
# tmux_conf_theme_status_bg=${tmux_conf_theme_status_bg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_status_attr=${tmux_conf_theme_status_attr:-none}
#
# tmux_conf_theme_terminal_title=${tmux_conf_theme_terminal_title:-#h ❐ #S ● #I #W}
#
# tmux_conf_theme_window_status_fg=${tmux_conf_theme_window_status_fg:-$tmux_conf_theme_colour_3}
# tmux_conf_theme_window_status_bg=${tmux_conf_theme_window_status_bg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_window_status_attr=${tmux_conf_theme_window_status_attr:-none}
# tmux_conf_theme_window_status_format=${tmux_conf_theme_window_status_format:-#I #W}
#
# tmux_conf_theme_window_status_current_fg=${tmux_conf_theme_window_status_current_fg:-$tmux_conf_theme_colour_1}
# tmux_conf_theme_window_status_current_bg=${tmux_conf_theme_window_status_current_bg:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_window_status_current_attr=${tmux_conf_theme_window_status_current_attr:-bold}
# tmux_conf_theme_window_status_current_format=${tmux_conf_theme_window_status_current_format:-#I #W}
#
# tmux_conf_theme_window_status_activity_fg=${tmux_conf_theme_window_status_activity_fg:-default}
# tmux_conf_theme_window_status_activity_bg=${tmux_conf_theme_window_status_activity_bg:-default}
# tmux_conf_theme_window_status_activity_attr=${tmux_conf_theme_window_status_activity_attr:-underscore}
#
# tmux_conf_theme_window_status_bell_fg=${tmux_conf_theme_window_status_bell_fg:-$tmux_conf_theme_colour_5}
# tmux_conf_theme_window_status_bell_bg=${tmux_conf_theme_window_status_bell_bg:-default}
# tmux_conf_theme_window_status_bell_attr=${tmux_conf_theme_window_status_bell_attr:-blink,bold}
#
# tmux_conf_theme_window_status_last_fg=${tmux_conf_theme_window_status_last_fg:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_window_status_last_bg=${tmux_conf_theme_window_status_last_bg:-default}
# tmux_conf_theme_window_status_last_attr=${tmux_conf_theme_window_status_last_attr:-none}
#
# if [ x"$tmux_conf_theme_window_status_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bg" = x"default" ]; then
# spacer=''
# spacer_current=' '
# else
# spacer=' '
# spacer_current=' '
# fi
# if [ x"$tmux_conf_theme_window_status_last_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_last_bg" = x"default" ] ; then
# spacer_last=''
# else
# spacer_last=' '
# fi
# if [ x"$tmux_conf_theme_window_status_activity_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_activity_bg" = x"default" ] ; then
# spacer_activity=''
# spacer_last_activity="$spacer_last"
# else
# spacer_activity=' '
# spacer_last_activity=' '
# fi
# if [ x"$tmux_conf_theme_window_status_bell_bg" = x"$tmux_conf_theme_status_bg" ] || [ x"$tmux_conf_theme_window_status_bell_bg" = x"default" ] ; then
# spacer_bell=''
# spacer_last_bell="$spacer_last"
# spacer_activity_bell="$spacer_activity"
# spacer_last_activity_bell="$spacer_last_activity"
# else
# spacer_bell=' '
# spacer_last_bell=' '
# spacer_activity_bell=' '
# spacer_last_activity_bell=' '
# fi
# spacer="#{?window_last_flag,#{?window_activity_flag,#{?window_bell_flag,$spacer_last_activity_bell,$spacer_last_activity},#{?window_bell_flag,$spacer_last_bell,$spacer_last}},#{?window_activity_flag,#{?window_bell_flag,$spacer_activity_bell,$spacer_activity},#{?window_bell_flag,$spacer_bell,$spacer}}}"
# if [ x"$(tmux show -g -v status-justify)" = x"right" ]; then
# if [ -z "$tmux_conf_theme_right_separator_main" ]; then
# window_status_separator=' '
# else
# window_status_separator=''
# fi
# window_status_format="#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag?,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#[none]$tmux_conf_theme_right_separator_main"
# window_status_current_format="#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg,none]$tmux_conf_theme_right_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_right_separator_main"
# else
# if [ -z "$tmux_conf_theme_left_separator_main" ]; then
# window_status_separator=' '
# else
# window_status_separator=''
# fi
# window_status_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_bg,none]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_fg,bg=$tmux_conf_theme_window_status_bg,$tmux_conf_theme_window_status_attr]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_fg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[bg=$&]/; print if !/default/"),}$spacer$(printf "$tmux_conf_theme_window_status_last_attr" | perl -n -e 'print "#{?window_last_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_last_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_activity_attr" | perl -n -e 'print "#{?window_activity_flag,#[none],}" if !/default/ ; s/([a-z]+),?/#{?window_activity_flag,#[\1],}/g; print if !/default/')$(printf "$tmux_conf_theme_window_status_bell_attr" | perl -n -e 'print "#{?window_bell_flag,#[none],}" if /!default/ ; s/([a-z]+),?/#{?window_bell_flag,#[\1],}/g; print if !/default/')$tmux_conf_theme_window_status_format#[none]$spacer#[fg=$tmux_conf_theme_window_status_bg,bg=$tmux_conf_theme_status_bg]#{?window_last_flag,$(printf "$tmux_conf_theme_window_status_last_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_activity_flag,$(printf "$tmux_conf_theme_window_status_activity_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}#{?window_bell_flag,$(printf "$tmux_conf_theme_window_status_bell_bg" | perl -n -e "s/.+/#[fg=$&]/; print if !/default/"),}$tmux_conf_theme_left_separator_main"
# window_status_current_format="#[fg=$tmux_conf_theme_status_bg,bg=$tmux_conf_theme_window_status_current_bg,none]$tmux_conf_theme_left_separator_main#[fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr]$spacer_current$tmux_conf_theme_window_status_current_format$spacer_current#[fg=$tmux_conf_theme_window_status_current_bg,bg=$tmux_conf_theme_status_bg]$tmux_conf_theme_left_separator_main"
# fi
#
# # -- indicators
#
# tmux_conf_theme_pairing=${tmux_conf_theme_pairing:-⚇} # U+2687
# tmux_conf_theme_pairing_fg=${tmux_conf_theme_pairing_fg:-none}
# tmux_conf_theme_pairing_bg=${tmux_conf_theme_pairing_bg:-none}
# tmux_conf_theme_pairing_attr=${tmux_conf_theme_pairing_attr:-none}
#
# tmux_conf_theme_prefix=${tmux_conf_theme_prefix:-⌨} # U+2328
# tmux_conf_theme_prefix_fg=${tmux_conf_theme_prefix_fg:-none}
# tmux_conf_theme_prefix_bg=${tmux_conf_theme_prefix_bg:-none}
# tmux_conf_theme_prefix_attr=${tmux_conf_theme_prefix_attr:-none}
#
# tmux_conf_theme_mouse=${tmux_conf_theme_mouse:-↗} # U+2197
# tmux_conf_theme_mouse_fg=${tmux_conf_theme_mouse_fg:-none}
# tmux_conf_theme_mouse_bg=${tmux_conf_theme_mouse_bg:-none}
# tmux_conf_theme_mouse_attr=${tmux_conf_theme_mouse_attr:-none}
#
# tmux_conf_theme_root=${tmux_conf_theme_root:-!}
# tmux_conf_theme_root_fg=${tmux_conf_theme_root_fg:-none}
# tmux_conf_theme_root_bg=${tmux_conf_theme_root_bg:-none}
# tmux_conf_theme_root_attr=${tmux_conf_theme_root_attr:-bold,blink}
#
# tmux_conf_theme_synchronized=${tmux_conf_theme_synchronized:-⚏} # U+268F
# tmux_conf_theme_synchronized_fg=${tmux_conf_theme_synchronized_fg:-none}
# tmux_conf_theme_synchronized_bg=${tmux_conf_theme_synchronized_bg:-none}
# tmux_conf_theme_synchronized_attr=${tmux_conf_theme_synchronized_attr:-none}
#
# # -- status-left style
#
# tmux_conf_theme_status_left=${tmux_conf_theme_status_left-' ❐ #S | ↑#{?uptime_y, #{uptime_y}y,}#{?uptime_d, #{uptime_d}d,}#{?uptime_h, #{uptime_h}h,}#{?uptime_m, #{uptime_m}m,} '}
# tmux_conf_theme_status_left_fg=${tmux_conf_theme_status_left_fg:-$tmux_conf_theme_colour_6,$tmux_conf_theme_colour_7,$tmux_conf_theme_colour_8}
# tmux_conf_theme_status_left_bg=${tmux_conf_theme_status_left_bg:-$tmux_conf_theme_colour_9,$tmux_conf_theme_colour_10,$tmux_conf_theme_colour_11}
# tmux_conf_theme_status_left_attr=${tmux_conf_theme_status_left_attr:-bold,none,none}
#
# if [ -n "$tmux_conf_theme_status_left" ]; then
# status_left=$(echo "$tmux_conf_theme_status_left" | sed \
# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{pairing}/g" \
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{prefix}/g" \
# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{mouse}/g" \
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{synchronized}%g" \
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{root}#[inherit]%g")
#
# status_left=$(printf '%s' "$status_left" | awk \
# -v status_bg="$tmux_conf_theme_status_bg" \
# -v fg_="$tmux_conf_theme_status_left_fg" \
# -v bg_="$tmux_conf_theme_status_left_bg" \
# -v attr_="$tmux_conf_theme_status_left_attr" \
# -v mainsep="$tmux_conf_theme_left_separator_main" \
# -v subsep="$tmux_conf_theme_left_separator_sub" '
# function subsplit(s, l, i, a, r)
# {
# o = split(a[i], _, "(") - 1
# c = split(a[i], _, ")") - 1
# open += o - c
# o_ = split(a[i], _, "{") - 1
# c_ = split(a[i], _, "}") - 1
# open_ += o_ - c_
# o__ = split(a[i], _, "[") - 1
# c__ = split(a[i], _, "]") - 1
# open__ += o__ - c__
#
# if (i == l)
# r = sprintf("%s%s", r, a[i])
# else if (open || open_ || open__)
# r = sprintf("%s%s,", r, a[i])
# else
# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep)
# }
#
# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r)
# return r
# }
# BEGIN {
# FS = "|"
# l1 = split(fg_, fg, ",")
# l2 = split(bg_, bg, ",")
# l3 = split(attr_, attr, ",")
# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3)
# }
# {
# for (i = j = 1; i <= NF; ++i)
# {
# if (open || open_ || open__)
# printf "|%s", subsplit($i)
# else
# l = split(s, a, ",")
# for (i = 1; i <= l; ++i)
# {
# if (i > 1)
# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j_], bg[j], mainsep, fg[j], bg[j], attr[j], subsplit($i)
# o = split(a[i], _, "(") - 1
# c = split(a[i], _, ")") - 1
# open += o - c
# o_ = split(a[i], _, "{") - 1
# c_ = split(a[i], _, "}") - 1
# open_ += o_ - c_
# o__ = split(a[i], _, "[") - 1
# c__ = split(a[i], _, "]") - 1
# open__ += o__ - c__
#
# if (i == l)
# r = sprintf("%s%s", r, a[i])
# else if (open || open_ || open__)
# r = sprintf("%s%s,", r, a[i])
# else
# printf "#[fg=%s,bg=%s,%s]%s", fg[j], bg[j], attr[j], subsplit($i)
# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep)
# }
#
# if (!open && !open_ && !open__)
# {
# j_ = j
# j = j % l + 1
# }
# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r)
# return r
# }
# printf "#[fg=%s,bg=%s,none]%s", bg[j_], status_bg, mainsep
# }')
# fi
# BEGIN {
# FS = "|"
# l1 = split(fg_, fg, ",")
# l2 = split(bg_, bg, ",")
# l3 = split(attr_, attr, ",")
# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3)
# }
# {
# for (i = j = 1; i <= NF; ++i)
# {
# if (open || open_ || open__)
# printf "|%s", subsplit($i)
# else
# {
# if (i > 1)
# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j_], bg[j], mainsep, fg[j], bg[j], attr[j], subsplit($i)
# else
# printf "#[fg=%s,bg=%s,%s]%s", fg[j], bg[j], attr[j], subsplit($i)
# }
#
# status_left="$status_left "
# if (!open && !open_ && !open__)
# {
# j_ = j
# j = j % l + 1
# }
# }
# printf "#[fg=%s,bg=%s,none]%s", bg[j_], status_bg, mainsep
# }')
#
# # -- status-right style
#
# tmux_conf_theme_status_right=${tmux_conf_theme_status_right-' #{prefix}#{mouse}#{pairing}#{synchronized}#{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '}
# tmux_conf_theme_status_right_fg=${tmux_conf_theme_status_right_fg:-$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14}
# tmux_conf_theme_status_right_bg=${tmux_conf_theme_status_right_bg:-$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17}
# tmux_conf_theme_status_right_attr=${tmux_conf_theme_status_right_attr:-none,none,bold}
#
# if [ -n "$tmux_conf_theme_status_right" ]; then
# status_right=$(echo "$tmux_conf_theme_status_right" | sed \
# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \
# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g')
#
# if [ -z "$(tmux display -p '#{version}')" ]; then
# status_right=$(echo "$status_right" | sed \
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}#[inherit]%g")
# else
# status_right=$(echo "$status_right" | sed \
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#(cut -c3- ~/.tmux.conf | sh -s _root #{pane_pid} #{b:pane_tty} $tmux_conf_theme_root #D)#[inherit]%g")
# status_left="$status_left "
# fi
#
# status_right=$(printf '%s' "$status_right" | awk \
# -v status_bg="$tmux_conf_theme_status_bg" \
# -v fg_="$tmux_conf_theme_status_right_fg" \
# -v bg_="$tmux_conf_theme_status_right_bg" \
# -v attr_="$tmux_conf_theme_status_right_attr" \
# -v mainsep="$tmux_conf_theme_right_separator_main" \
# -v subsep="$tmux_conf_theme_right_separator_sub" '
# function subsplit(s, l, i, a, r)
# {
# l = split(s, a, ",")
# for (i = 1; i <= l; ++i)
# # -- status-right style
#
# tmux_conf_theme_status_right=${tmux_conf_theme_status_right-' #{prefix}#{mouse}#{pairing}#{synchronized}#{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} , %R , %d %b | #{username}#{root} | #{hostname} '}
# tmux_conf_theme_status_right_fg=${tmux_conf_theme_status_right_fg:-$tmux_conf_theme_colour_12,$tmux_conf_theme_colour_13,$tmux_conf_theme_colour_14}
# tmux_conf_theme_status_right_bg=${tmux_conf_theme_status_right_bg:-$tmux_conf_theme_colour_15,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_17}
# tmux_conf_theme_status_right_attr=${tmux_conf_theme_status_right_attr:-none,none,bold}
#
# if [ -n "$tmux_conf_theme_status_right" ]; then
# status_right=$(echo "$tmux_conf_theme_status_right" | sed \
# -e "s/#{pairing}/#[fg=$tmux_conf_theme_pairing_fg]#[bg=$tmux_conf_theme_pairing_bg]#[$tmux_conf_theme_pairing_attr]#{pairing}/g" \
# -e "s/#{prefix}/#[fg=$tmux_conf_theme_prefix_fg]#[bg=$tmux_conf_theme_prefix_bg]#[$tmux_conf_theme_prefix_attr]#{prefix}/g" \
# -e "s/#{mouse}/#[fg=$tmux_conf_theme_mouse_fg]#[bg=$tmux_conf_theme_mouse_bg]#[$tmux_conf_theme_mouse_attr]#{mouse}/g" \
# -e "s%#{synchronized}%#[fg=$tmux_conf_theme_synchronized_fg]#[bg=$tmux_conf_theme_synchronized_bg]#[$tmux_conf_theme_synchronized_attr]#{synchronized}%g" \
# -e "s%#{root}%#[fg=$tmux_conf_theme_root_fg]#[bg=$tmux_conf_theme_root_bg]#[$tmux_conf_theme_root_attr]#{root}#[inherit]%g")
#
# status_right=$(printf '%s' "$status_right" | awk \
# -v status_bg="$tmux_conf_theme_status_bg" \
# -v fg_="$tmux_conf_theme_status_right_fg" \
# -v bg_="$tmux_conf_theme_status_right_bg" \
# -v attr_="$tmux_conf_theme_status_right_attr" \
# -v mainsep="$tmux_conf_theme_right_separator_main" \
# -v subsep="$tmux_conf_theme_right_separator_sub" '
# function subsplit(s, l, i, a, r)
# {
# o = split(a[i], _, "(") - 1
# c = split(a[i], _, ")") - 1
# open += o - c
# o_ = split(a[i], _, "{") - 1
# c_ = split(a[i], _, "}") - 1
# open_ += o_ - c_
# o__ = split(a[i], _, "[") - 1
# c__ = split(a[i], _, "]") - 1
# open__ += o__ - c__
#
# if (i == l)
# r = sprintf("%s%s", r, a[i])
# else if (open || open_ || open__)
# r = sprintf("%s%s,", r, a[i])
# else
# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep)
# }
#
# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r)
# return r
# }
# BEGIN {
# FS = "|"
# l1 = split(fg_, fg, ",")
# l2 = split(bg_, bg, ",")
# l3 = split(attr_, attr, ",")
# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3)
# }
# {
# for (i = j = 1; i <= NF; ++i)
# {
# if (open_ || open || open__)
# printf "|%s", subsplit($i)
# else
# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j], (i == 1) ? status_bg : bg[j_], mainsep, fg[j], bg[j], attr[j], subsplit($i)
#
# if (!open && !open_ && !open__)
# l = split(s, a, ",")
# for (i = 1; i <= l; ++i)
# {
# j_ = j
# j = j % l + 1
# o = split(a[i], _, "(") - 1
# c = split(a[i], _, ")") - 1
# open += o - c
# o_ = split(a[i], _, "{") - 1
# c_ = split(a[i], _, "}") - 1
# open_ += o_ - c_
# o__ = split(a[i], _, "[") - 1
# c__ = split(a[i], _, "]") - 1
# open__ += o__ - c__
#
# if (i == l)
# r = sprintf("%s%s", r, a[i])
# else if (open || open_ || open__)
# r = sprintf("%s%s,", r, a[i])
# else
# r = sprintf("%s%s#[fg=%s,bg=%s,%s]%s", r, a[i], fg[j], bg[j], attr[j], subsep)
# }
#
# gsub(/#\[inherit\]/, sprintf("#[default]#[fg=%s,bg=%s,%s]", fg[j], bg[j], attr[j]), r)
# return r
# }
# }')
# BEGIN {
# FS = "|"
# l1 = split(fg_, fg, ",")
# l2 = split(bg_, bg, ",")
# l3 = split(attr_, attr, ",")
# l = l1 < l2 ? (l1 < l3 ? l1 : l3) : (l2 < l3 ? l2 : l3)
# }
# {
# for (i = j = 1; i <= NF; ++i)
# {
# if (open_ || open || open__)
# printf "|%s", subsplit($i)
# else
# printf "#[fg=%s,bg=%s,none]%s#[fg=%s,bg=%s,%s]%s", bg[j], (i == 1) ? status_bg : bg[j_], mainsep, fg[j], bg[j], attr[j], subsplit($i)
#
# if (!open && !open_ && !open__)
# {
# j_ = j
# j = j % l + 1
# }
# }
# }')
# fi
#
# # -- clock ---------------------------------------------------------------
#
# tmux_conf_theme_clock_colour=${tmux_conf_theme_clock_colour:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_clock_style=${tmux_conf_theme_clock_style:-24}
#
# tmux setw -g window-style "$window_style" \; setw -g window-active-style "$window_active_style" \;\
# setw -g pane-border-style "fg=$tmux_conf_theme_pane_border_fg,bg=$tmux_conf_theme_pane_border_bg" \; set -g pane-active-border-style "fg=$tmux_conf_theme_pane_active_border_fg,bg=$tmux_conf_theme_pane_active_border_bg" \;\
# set -g display-panes-colour "$tmux_conf_theme_pane_indicator" \; set -g display-panes-active-colour "$tmux_conf_theme_pane_active_indicator" \;\
# set -g message-style "fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr" \;\
# set -g message-command-style "fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_command_attr" \;\
# setw -g mode-style "fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr" \;\
# set -g status-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\
# 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" \;\
# 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-current-style "fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr" \;\
# setw -g window-status-activity-style "fg=$tmux_conf_theme_window_status_activity_fg,bg=$tmux_conf_theme_window_status_activity_bg,$tmux_conf_theme_window_status_activity_attr" \;\
# setw -g window-status-bell-style "fg=$tmux_conf_theme_window_status_bell_fg,bg=$tmux_conf_theme_window_status_bell_bg,$tmux_conf_theme_window_status_bell_attr" \;\
# setw -g window-status-last-style "fg=$tmux_conf_theme_window_status_last_fg,bg=$tmux_conf_theme_window_status_last_bg,$tmux_conf_theme_window_status_last_attr" \;\
# setw -g window-status-separator "$window_status_separator" \;\
# setw -g clock-mode-colour "$tmux_conf_theme_clock_colour" \;\
# setw -g clock-mode-style "$tmux_conf_theme_clock_style"
# fi
#
# # -- variables
# # -- variables -------------------------------------------------------------
#
# set_titles_string=$(printf '%s' "${tmux_conf_theme_terminal_title:-$(tmux show -gv set-titles-string)}" | sed \
# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \
# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \
# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g')
#
# window_status_format=$(printf '%s' "${window_status_format:-$(tmux show -gv window-status-format)}" | sed \
# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \
# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \
# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g')
#
# window_status_current_format=$(printf '%s' "${window_status_current_format:-$(tmux show -gv window-status-current-format)}" | sed \
# -e 's%#{circled_window_index}%#(cut -c3- ~/.tmux.conf | sh -s _circled #I)%g' \
# -e 's%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g' \
# -e 's%#{username}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} false #D)%g' \
# -e 's%#{hostname}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false false #h #D)%g' \
# -e 's%#{hostname_full}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} false true #H #D)%g' \
# -e 's%#{username_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} true #D)%g' \
# -e 's%#{hostname_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true false #h #D)%g' \
# -e 's%#{hostname_full_ssh}%#(cut -c3- ~/.tmux.conf | sh -s _hostname #{pane_pid} #{b:pane_tty} true true #H #D)%g')
#
# status_left=$(printf '%s' "${status_left:-$(tmux show -gv status-left)}" | sed \
# -e "s/#{pairing}/#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \
# -e "s/#{prefix}/#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \
# -e "s/#{mouse}/#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \
# -e "s%#{synchronized}%#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \
# -e "s%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g" \
# -e "s%#{root}%#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}%g")
#
# status_right=$(printf '%s' "${status_right:-$(tmux show -gv status-right)}" | sed \
# -e "s/#{pairing}/#{?session_many_attached,$tmux_conf_theme_pairing ,}/g" \
# -e "s/#{prefix}/#{?client_prefix,$tmux_conf_theme_prefix ,$(printf "$tmux_conf_theme_prefix" | sed -e 's/./ /g') }/g" \
# -e "s/#{mouse}/#{?mouse,$tmux_conf_theme_mouse ,$(printf "$tmux_conf_theme_mouse" | sed -e 's/./ /g') }/g" \
# -e "s%#{synchronized}%#{?pane_synchronized,$tmux_conf_theme_synchronized ,}%g" \
# -e "s%#{circled_session_name}%#(cut -c3- ~/.tmux.conf | sh -s _circled #S)%g" \
# -e "s%#{root}%#{?#{==:#(cut -c3- ~/.tmux.conf | sh -s _username #{pane_pid} #{b:pane_tty} #D),root},$tmux_conf_theme_root,}%g")
#
# tmux_conf_battery_bar_symbol_full=$(_decode_unicode_escapes "${tmux_conf_battery_bar_symbol_full:-◼}")
# tmux_conf_battery_bar_symbol_empty=$(_decode_unicode_escapes "${tmux_conf_battery_bar_symbol_empty:-◻}")
@ -1341,12 +1340,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# ;;
# esac
#
# # -- clock -------------------------------------------------------------
#
# tmux_conf_theme_clock_colour=${tmux_conf_theme_clock_colour:-$tmux_conf_theme_colour_4}
# tmux_conf_theme_clock_style=${tmux_conf_theme_clock_style:-24}
#
# # -- custom variables ---------------------------------------------------
# # -- custom variables ------------------------------------------------------
#
# if [ -f ~/.tmux.conf.local ] && [ x"$(cut -c3- ~/.tmux.conf.local | sh 2>/dev/null -s printf probe)" = x"probe" ]; then
# replacements=$(perl -n -e 'print if s!^#\s+([^_][^()\s]+)\s*\(\)\s*{\s*(?:#.*)?\n!s%#\\\{\1((?:\\s+(?:[^\{\}]+?|#\\{(?:[^\{\}]+?)\}))*)\\\}%#(cut -c3- ~/.tmux.conf.local | sh -s \1\\1)%g; !p' < ~/.tmux.conf.local)
@ -1354,30 +1348,13 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# status_right=$(echo "$status_right" | perl -p -e "$replacements" || echo "$status_right")
# fi
#
# # -----------------------------------------------------------------------
# # --------------------------------------------------------------------------
#
# tmux setw -g window-style "$window_style" \; setw -g window-active-style "$window_active_style" \;\
# setw -g pane-border-style "fg=$tmux_conf_theme_pane_border_fg,bg=$tmux_conf_theme_pane_border_bg" \; set -g pane-active-border-style "fg=$tmux_conf_theme_pane_active_border_fg,bg=$tmux_conf_theme_pane_active_border_bg" \;\
# set -g display-panes-colour "$tmux_conf_theme_pane_indicator" \; set -g display-panes-active-colour "$tmux_conf_theme_pane_active_indicator" \;\
# set -g message-style "fg=$tmux_conf_theme_message_fg,bg=$tmux_conf_theme_message_bg,$tmux_conf_theme_message_attr" \;\
# set -g message-command-style "fg=$tmux_conf_theme_message_command_fg,bg=$tmux_conf_theme_message_command_bg,$tmux_conf_theme_message_command_attr" \;\
# setw -g mode-style "fg=$tmux_conf_theme_mode_fg,bg=$tmux_conf_theme_mode_bg,$tmux_conf_theme_mode_attr" \;\
# set -g status-style "fg=$tmux_conf_theme_status_fg,bg=$tmux_conf_theme_status_bg,$tmux_conf_theme_status_attr" \;\
# 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" \;\
# set -g set-titles-string "$(_decode_unicode_escapes "$tmux_conf_theme_terminal_title")" \;\
# 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 "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_format")" \;\
# setw -g window-status-current-style "fg=$tmux_conf_theme_window_status_current_fg,bg=$tmux_conf_theme_window_status_current_bg,$tmux_conf_theme_window_status_current_attr" \;\
# setw -g window-status-current-format "$(_decode_unicode_escapes "$tmux_conf_theme_window_status_current_format")" \;\
# setw -g window-status-activity-style "fg=$tmux_conf_theme_window_status_activity_fg,bg=$tmux_conf_theme_window_status_activity_bg,$tmux_conf_theme_window_status_activity_attr" \;\
# setw -g window-status-bell-style "fg=$tmux_conf_theme_window_status_bell_fg,bg=$tmux_conf_theme_window_status_bell_bg,$tmux_conf_theme_window_status_bell_attr" \;\
# setw -g window-status-last-style "fg=$tmux_conf_theme_window_status_last_fg,bg=$tmux_conf_theme_window_status_last_bg,$tmux_conf_theme_window_status_last_attr" \;\
# setw -g window-status-separator "$window_status_separator" \;\
# tmux set -g set-titles-string "$(_decode_unicode_escapes "$set_titles_string")" \;\
# setw -g window-status-format "$(_decode_unicode_escapes "$window_status_format")" \;\
# setw -g window-status-current-format "$(_decode_unicode_escapes "$window_status_current_format")" \;\
# set -g status-left-length 1000 \; set -g status-left "$(_decode_unicode_escapes "$status_left")" \;\
# set -g status-right-length 1000 \; set -g status-right "$(_decode_unicode_escapes "$status_right")" \;\
# setw -g clock-mode-colour "$tmux_conf_theme_clock_colour" \;\
# setw -g clock-mode-style "$tmux_conf_theme_clock_style"
# set -g status-right-length 1000 \; set -g status-right "$(_decode_unicode_escapes "$status_right")"
# }
#
# __apply_plugins() {
@ -1440,10 +1417,6 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# tmux set -gu '@tpm-install' \; set -gu '@tpm-update' \; set -gu '@tpm-clean' \; set -gu '@plugin'
# fi
# fi
#
# if [ -z "$window_active" ] && [ $_tmux_version -lt 240 ]; then
# tmux run -b "sleep $(expr $(tmux display -p '#{display-time}') / 500) && tmux set display-time 3000 \; display 'This configuration will soon require tmux 2.4+' \; set -u display-time"
# fi
# }
#
# _apply_plugins() {
@ -1468,7 +1441,6 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# }
#
# _apply_configuration() {
#
# window_active="$(tmux display -p '#{window_active}' 2>/dev/null || true)"
# if [ -z "$window_active" ]; then
# if ! command -v perl > /dev/null 2>&1; then
@ -1483,8 +1455,8 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires awk" \; set -u display-time \; run "sleep 3" \; kill-server'
# return
# fi
# if [ $_tmux_version -lt 230 ]; then
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.3+" \; set -u display-time \; run "sleep 3" \; kill-server'
# if [ $_tmux_version -lt 240 ]; then
# tmux run -b 'tmux set display-time 3000 \; display "This configuration requires tmux 2.4+" \; set -u display-time \; run "sleep 3" \; kill-server'
# return
# fi
# fi
@ -1509,7 +1481,7 @@ run 'cut -c3- ~/.tmux.conf | sh -s _apply_configuration'
# ;;
# esac
#
# _apply_24b
# _apply_24b&
# _apply_theme&
# _apply_bindings&
# wait

View file

@ -5,16 +5,6 @@
# Copyright 2012— Gregory Pakosz (@gpakosz).
# -- navigation ----------------------------------------------------------------
# if you're running tmux within iTerm2
# - and tmux is 1.9 or 1.9a
# - and iTerm2 is configured to let option key act as +Esc
# - and iTerm2 is configured to send [1;9A -> [1;9D for option + arrow keys
# then uncomment the following line to make Meta + arrow keys mapping work
#set -ga terminal-overrides "*:kUP3=\e[1;9A,*:kDN3=\e[1;9B,*:kRIT3=\e[1;9C,*:kLFT3=\e[1;9D"
# -- windows & pane creation ---------------------------------------------------
# new window retains current path, possible values are:
@ -44,16 +34,30 @@ tmux_conf_new_session_prompt=false
# -- display -------------------------------------------------------------------
# RGB 24-bit colour support (tmux >= 2.2), possible values are:
# - true
# - false
# - auto (default)
# RGB 24-bit colour support, possible values are:
# - true
# - false
# - auto (default)
#
# automatic detection relies on the COLORTERM environment variable being defined
# to 'truecolor' or '24bit' or '$ tput colors' answering '16777216'
# see https://github.com/termstandard/colors
tmux_conf_24b_colour=auto
# -- theming -------------------------------------------------------------------
# enable or disable theming:
# - enabled (default)
# - disabled
# when disabled, all tmux_conf_theme_xxx variables are ignored except:
# - tmux_conf_theme_pairing
# - tmux_conf_theme_prefix
# - tmux_conf_theme_mouse
# - tmux_conf_theme_root
# - tmux_conf_theme_synchronized
tmux_conf_theme=enabled
# default theme
tmux_conf_theme_colour_1="#080808" # dark gray
tmux_conf_theme_colour_2="#303030" # gray
@ -96,7 +100,7 @@ tmux_conf_theme_colour_17="#e4e4e4" # white
tmux_conf_theme_window_fg="default"
tmux_conf_theme_window_bg="default"
# highlight focused pane (tmux >= 2.1), possible values are:
# highlight focused pane, possible values are:
# - true
# - false (default)
tmux_conf_theme_highlight_focused_pane=false
@ -112,6 +116,9 @@ tmux_conf_theme_pane_border_style=thin
# pane borders colours:
tmux_conf_theme_pane_border="$tmux_conf_theme_colour_2"
tmux_conf_theme_pane_active_border="$tmux_conf_theme_colour_4"
%if #{>=:#{version},3.2}
tmux_conf_theme_pane_active_border="#{?pane_in_mode,$tmux_conf_theme_colour_9,#{?synchronize-panes,$tmux_conf_theme_colour_16,$tmux_conf_theme_colour_4}}"
%endif
# pane indicator colours (when you hit <prefix> + q)
tmux_conf_theme_pane_indicator="$tmux_conf_theme_colour_4"

View file

@ -10,8 +10,7 @@ Installation
Requirements:
- tmux **`>= 2.3`** (soon `>= 2.4`) running inside Linux, Mac, OpenBSD, Cygwin
or WSL
- tmux **`>= 2.4`** running inside Linux, Mac, OpenBSD, Cygwin or WSL
- awk, perl and sed
- outside of tmux, `$TERM` must be set to `xterm-256color`