feat: pane enable & top/bottom

This commit is contained in:
Emil Toivainen 2024-01-11 21:03:25 +02:00
parent 0972b6d300
commit 38b25a816d
3 changed files with 47 additions and 60 deletions

View file

@ -69,10 +69,6 @@ build_pane_format() {
if [ "$pane_status_enable" = "yes" ]
then
local icon="$( build_pane_icon )"
text="$text $icon"
fi
if [ "$fill" = "none" ]
then
local show_left_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$pane_left_separator"
@ -80,7 +76,6 @@ build_pane_format() {
local show_middle_separator="#[fg=$thm_fg,bg=$thm_gray,nobold,nounderscore,noitalics]$pane_middle_separator"
local show_text="#[fg=$thm_fg,bg=$thm_gray]$text"
local show_right_separator="#[fg=$thm_gray,bg=$thm_bg]$pane_right_separator"
fi
if [ "$fill" = "all" ]
@ -125,6 +120,7 @@ build_pane_format() {
fi
echo "$final_pane_format"
fi
}
build_window_format() {
@ -363,15 +359,17 @@ main() {
set message-command-style "fg=${thm_cyan},bg=${thm_gray},align=centre"
# panes
local pane_status_enable=$(get_tmux_option "@catppuccin_pane_status_enabled" "no") # yes
local pane_border_status=$(get_tmux_option "@catppuccin_pane_border_status" "top") # bottom
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")
setw pane-border-status "$pane_border_status"
setw pane-active-border-style "$pane_active_border_style"
setw pane-border-style "$pane_border_style"
setw pane-border-format "$pane_format"

View file

@ -1,12 +0,0 @@
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"
}

View file

@ -1,9 +1,10 @@
show_pane_default_format() {
local number="#I"
local color="$thm_blue"
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}")" # use #W for application instead of directory
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")