From 17c3e2429736f2353b49ca2a45644edbf1cd7f36 Mon Sep 17 00:00:00 2001 From: Emil Toivainen Date: Wed, 10 Jan 2024 15:41:38 +0200 Subject: [PATCH] feat: pane default format sh --- catppuccin.tmux | 4 ++++ pane/pane_default_format.sh | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/catppuccin.tmux b/catppuccin.tmux index 24bfb1d..e0dab4c 100755 --- a/catppuccin.tmux +++ b/catppuccin.tmux @@ -268,6 +268,7 @@ load_modules() { local modules_custom_path=$PLUGIN_DIR/custom local modules_status_path=$PLUGIN_DIR/status local modules_window_path=$PLUGIN_DIR/window + local modules_pane_path=$PLUGIN_DIR/pane local module_index=0; local module_name @@ -307,6 +308,9 @@ load_modules() { local module_path=$modules_window_path/$module_name.sh source $module_path + local module_path=$modules_pane_path/$module_name.sh + source $module_path + if [ 0 -eq $? ] then loaded_modules="$loaded_modules$( show_$module_name $module_index )" diff --git a/pane/pane_default_format.sh b/pane/pane_default_format.sh index e69de29..30cbb4d 100644 --- a/pane/pane_default_format.sh +++ b/pane/pane_default_format.sh @@ -0,0 +1,11 @@ +show_pane_default_format() { + local number="#I" + local color="$thm_blue" + local background="$thm_gray" + local text="$(get_tmux_option "@catppuccin_pane_default_text" "#{b:pane_current_path}")" # use #W for application instead of directory + local fill="$(get_tmux_option "@catppuccin_pane_default_fill" "number")" # number, all, none + + local default_pane_format=$( build_pane_format "$number" "$color" "$background" "$text" "$fill" ) + + echo "$default_pane_format" +}