diff --git a/catppuccin.tmux b/catppuccin.tmux index e0dab4c..b445495 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -90,7 +90,6 @@ build_pane_format() { local show_middle_separator="#[fg=$background,bg=$color,nobold,nounderscore,noitalics]$pane_middle_separator" local show_text="#[fg=$background,bg=$color]$text" local show_right_separator="#[fg=$color,bg=$thm_bg]$pane_right_separator" - fi if [ "$fill" = "number" ] @@ -308,6 +307,13 @@ load_modules() { local module_path=$modules_window_path/$module_name.sh source $module_path + if [ 0 -eq $? ] + then + loaded_modules="$loaded_modules$( show_$module_name $module_index )" + module_index=$module_index+1 + continue + fi + local module_path=$modules_pane_path/$module_name.sh source $module_path @@ -318,6 +324,7 @@ load_modules() { continue fi + done echo "$loaded_modules" @@ -356,17 +363,18 @@ main() { set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre" # panes - local pane_border_style=$(get_tmux_option "@catppuccin_pane_border_style" "fg=${thm_blue}") + local pane_border_style=$(get_tmux_option "@catppuccin_pane_border_style" "fg=${thm_gray}") local pane_active_border_style=$(get_tmux_option "@catppuccin_pane_active_border_style" "fg=${thm_orange}") local pane_left_separator=$(get_tmux_option "@catppuccin_pane_left_separator" "█") local pane_middle_separator=$(get_tmux_option "@catppuccin_pane_middle_separator" "█") local pane_right_separator=$(get_tmux_option "@catppuccin_pane_right_separator" "█") local pane_number_position=$(get_tmux_option "@catppuccin_pane_number_position" "left") # right, left local pane_status_enable=$(get_tmux_option "@catppuccin_pane_status_enable" "no") + local pane_format=$( load_modules "pane_default_format") - local pane_current_format=$( load_modules "pane_current_format") - set pane-border-style "${pane_border_style}" - set pane-active-border-style "${pane_active_border_style}" + setw pane-active-border-style "$pane_active_border_style" + setw pane-border-style "$pane_border_style" + setw pane-border-format "$pane_format" # windows setw window-status-activity-style "fg=${thm_fg},bg=${thm_bg},none" @@ -402,12 +410,6 @@ main() { set status-left "$loaded_modules_left" set status-right "$loaded_modules_right" - # --------=== Panes - # - - local pane_format=$( load_modules "pane_default_format") - setw pane-border-format "$pane_format" - # --------=== Modes # setw clock-mode-colour "${thm_blue}" diff --git a/pane/pane/pane_default_format.sh b/pane/pane/pane_default_format.sh new file mode 100644 index 0000000..8e754b6 --- /dev/null +++ b/pane/pane/pane_default_format.sh @@ -0,0 +1,12 @@ +show_pane_default_format() { + local number="#{pane_index}" + local color="$thm_green" + local background="$thm_gray" + local text="$(get_tmux_option "@catppuccin_pane_default_text" "#{b:pane_current_path}")" + local fill="$(get_tmux_option "@catppuccin_pane_default_fill" "number")" # number, all, none + local active="#{pane_active}" + + local default_pane_format=$( build_pane_format "$number" "$color" "$background" "$text" "$fill") + + echo "$default_pane_format" +}