Revert "Merge pull request #78 from ervinpopescu/add-config-options"
This reverts commit2c5f785661
, reversing changes made to79230ddb54
.
This commit is contained in:
parent
2c5f785661
commit
89ad057ebd
1 changed files with 63 additions and 77 deletions
106
catppuccin.tmux
106
catppuccin.tmux
|
@ -7,8 +7,10 @@ get_tmux_option() {
|
|||
default="$2"
|
||||
value=$(tmux show-option -gqv "$option")
|
||||
|
||||
if [ -n "$value" ]; then
|
||||
if [ "$value" = "null" ]; then
|
||||
if [ -n "$value" ]
|
||||
then
|
||||
if [ "$value" = "null" ]
|
||||
then
|
||||
echo ""
|
||||
|
||||
else
|
||||
|
@ -44,12 +46,14 @@ build_window_icon() {
|
|||
local custom_icon_window_activity=$(get_tmux_option "@catppuccin_icon_window_activity" "")
|
||||
local custom_icon_window_bell=$(get_tmux_option "@catppuccin_icon_window_bell" "")
|
||||
|
||||
if [ "$window_status_icon_enable" = "yes" ]; then
|
||||
if [ "$window_status_icon_enable" = "yes" ]
|
||||
then
|
||||
# #!~[*-]MZ
|
||||
local show_window_status="#{?window_activity_flag,${custom_icon_window_activity},}#{?window_bell_flag,${custom_icon_window_bell},}#{?window_silence_flag,${custom_icon_window_silent},}#{?window_active,${custom_icon_window_current},}#{?window_last_flag,${custom_icon_window_last},}#{?window_marked_flag,${custom_icon_window_mark},}#{?window_zoomed_flag,${custom_icon_window_zoom},}"
|
||||
fi
|
||||
|
||||
if [ "$window_status_icon_enable" = "no" ]; then
|
||||
if [ "$window_status_icon_enable" = "no" ]
|
||||
then
|
||||
local show_window_status="#F"
|
||||
fi
|
||||
|
||||
|
@ -63,12 +67,14 @@ build_window_format() {
|
|||
local text=$4
|
||||
local fill=$5
|
||||
|
||||
if [ "$window_status_enable" = "yes" ]; then
|
||||
if [ "$window_status_enable" = "yes" ]
|
||||
then
|
||||
local icon="$( build_window_icon )"
|
||||
text="$text $icon"
|
||||
fi
|
||||
|
||||
if [ "$fill" = "none" ]; then
|
||||
if [ "$fill" = "none" ]
|
||||
then
|
||||
local show_left_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
local show_number="#[fg=$thm_fg,bg=$thm_gray]$number"
|
||||
local show_middle_separator="#[fg=$thm_fg,bg=$thm_gray,nobold,nounderscore,noitalics]$window_middle_separator"
|
||||
|
@ -77,7 +83,8 @@ build_window_format() {
|
|||
|
||||
fi
|
||||
|
||||
if [ "$fill" = "all" ]; then
|
||||
if [ "$fill" = "all" ]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
local show_number="#[fg=$background,bg=$color]$number"
|
||||
local show_middle_separator="#[fg=$background,bg=$color,nobold,nounderscore,noitalics]$window_middle_separator"
|
||||
|
@ -86,52 +93,35 @@ build_window_format() {
|
|||
|
||||
fi
|
||||
|
||||
if [ "$fill" = "number" ]; then
|
||||
|
||||
if [ "$fill" = "number" ]
|
||||
then
|
||||
local show_number="#[fg=$background,bg=$color]$number"
|
||||
local show_middle_separator="#[fg=$color,bg=$background,nobold,nounderscore,noitalics]$window_middle_separator"
|
||||
local show_text="#[fg=$thm_fg,bg=$background]$text"
|
||||
|
||||
if [ "$window_number_position" = "right" ]; then
|
||||
if [ "$window_number_position" = "right" ]
|
||||
then
|
||||
local show_left_separator="#[fg=$background,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
local show_right_separator="#[fg=$color,bg=$thm_bg]$window_right_separator"
|
||||
fi
|
||||
|
||||
if [ "$window_number_position" = "left" ]; then
|
||||
if [ "$window_number_position" = "left" ]
|
||||
then
|
||||
local show_right_separator="#[fg=$background,bg=$thm_bg,nobold,nounderscore,noitalics]$window_right_separator"
|
||||
local show_left_separator="#[fg=$color,bg=$thm_bg]$window_left_separator"
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
if [ "$window_left_separator_inverse" = "yes" ]; then
|
||||
local show_left_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
fi
|
||||
|
||||
if [ "$window_right_separator_inverse" = "yes" ]; then
|
||||
local show_right_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$window_right_separator"
|
||||
fi
|
||||
|
||||
if [ $((index)) -eq 0 ]; then
|
||||
if [ "$window_left_separator_inverse" = "yes" ]; then
|
||||
local show_left_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
else
|
||||
local show_left_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$window_left_separator"
|
||||
fi
|
||||
if [ "$window_right_separator_inverse" = "yes" ]; then
|
||||
local show_right_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$window_right_separator"
|
||||
else
|
||||
local show_right_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$window_right_separator"
|
||||
fi
|
||||
fi
|
||||
|
||||
local final_window_format
|
||||
|
||||
if [ "$window_number_position" = "right" ]; then
|
||||
if [ "$window_number_position" = "right" ]
|
||||
then
|
||||
final_window_format="$show_left_separator$show_text$show_middle_separator$show_number$show_right_separator"
|
||||
fi
|
||||
|
||||
if [ "$window_number_position" = "left" ]; then
|
||||
if [ "$window_number_position" = "left" ]
|
||||
then
|
||||
final_window_format="$show_left_separator$show_number$show_middle_separator$show_text$show_right_separator"
|
||||
fi
|
||||
|
||||
|
@ -144,7 +134,8 @@ build_status_module() {
|
|||
local color=$3
|
||||
local text=$4
|
||||
|
||||
if [ "$status_fill" = "icon" ]; then
|
||||
if [ "$status_fill" = "icon" ]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,bg=$thm_gray,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
|
||||
local show_icon="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$icon "
|
||||
|
@ -152,7 +143,8 @@ build_status_module() {
|
|||
|
||||
local show_right_separator="#[fg=$thm_gray,bg=$thm_bg,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
|
||||
if [ "$status_connect_separator" = "yes" ]; then
|
||||
if [ "$status_connect_separator" = "yes" ]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,bg=$thm_gray,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
local show_right_separator="#[fg=$thm_gray,bg=$thm_gray,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
|
||||
|
@ -163,7 +155,8 @@ build_status_module() {
|
|||
|
||||
fi
|
||||
|
||||
if [ "$status_fill" = "all" ]; then
|
||||
if [ "$status_fill" = "all" ]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,bg=$thm_gray,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
|
||||
local show_icon="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$icon "
|
||||
|
@ -171,7 +164,8 @@ build_status_module() {
|
|||
|
||||
local show_right_separator="#[fg=$color,bg=$thm_gray,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
|
||||
if [ "$status_connect_separator" = "yes" ]; then
|
||||
if [ "$status_connect_separator" = "yes" ]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
local show_right_separator="#[fg=$color,bg=$color,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
|
||||
|
@ -182,29 +176,21 @@ build_status_module() {
|
|||
|
||||
fi
|
||||
|
||||
if [ "$status_left_separator_inverse" = "yes" ]; then
|
||||
if [ "$status_connect_separator" = "yes" ]; then
|
||||
local show_left_separator="#[fg=$thm_gray,bg=$color,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
else
|
||||
local show_left_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ "$status_right_separator_inverse" = "yes" ]; then
|
||||
if [ "$status_connect_separator" = "yes" ]; then
|
||||
if [ "$status_right_separator_inverse" = "yes" ]
|
||||
then
|
||||
if [ "$status_connect_separator" = "yes" ]
|
||||
then
|
||||
local show_right_separator="#[fg=$thm_gray,bg=$color,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
else
|
||||
local show_right_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$status_right_separator"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [ $((index)) -eq 0 ]; then
|
||||
if [ "$status_left_separator_inverse" = "yes" ]; then
|
||||
local show_left_separator="#[fg=$thm_bg,bg=$color,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
else
|
||||
if [ $(($index)) -eq 0 ]
|
||||
then
|
||||
local show_left_separator="#[fg=$color,bg=$thm_bg,nobold,nounderscore,noitalics]$status_left_separator"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo "$show_left_separator$show_icon$show_text$show_right_separator"
|
||||
}
|
||||
|
||||
|
@ -215,7 +201,7 @@ load_modules() {
|
|||
local modules_status_path=$PLUGIN_DIR/status
|
||||
local modules_window_path=$PLUGIN_DIR/window
|
||||
|
||||
local module_index=0
|
||||
local module_index=0;
|
||||
local module_name
|
||||
local loaded_modules
|
||||
local IN=$modules_list
|
||||
|
@ -233,7 +219,8 @@ load_modules() {
|
|||
local module_path=$modules_custom_path/$module_name.sh
|
||||
source $module_path
|
||||
|
||||
if [ 0 -eq $? ]; then
|
||||
if [ 0 -eq $? ]
|
||||
then
|
||||
loaded_modules="$loaded_modules$( show_$module_name $module_index )"
|
||||
module_index=$module_index+1
|
||||
continue
|
||||
|
@ -242,7 +229,8 @@ load_modules() {
|
|||
local module_path=$modules_status_path/$module_name.sh
|
||||
source $module_path
|
||||
|
||||
if [ 0 -eq $? ]; then
|
||||
if [ 0 -eq $? ]
|
||||
then
|
||||
loaded_modules="$loaded_modules$( show_$module_name $module_index )"
|
||||
module_index=$module_index+1
|
||||
continue
|
||||
|
@ -251,7 +239,8 @@ load_modules() {
|
|||
local module_path=$modules_window_path/$module_name.sh
|
||||
source $module_path
|
||||
|
||||
if [ 0 -eq $? ]; then
|
||||
if [ 0 -eq $? ]
|
||||
then
|
||||
loaded_modules="$loaded_modules$( show_$module_name $module_index )"
|
||||
module_index=$module_index+1
|
||||
continue
|
||||
|
@ -306,9 +295,7 @@ main() {
|
|||
# --------=== Statusline
|
||||
|
||||
local window_left_separator=$(get_tmux_option "@catppuccin_window_left_separator" "█")
|
||||
local window_left_separator_inverse=$(get_tmux_option "@catppuccin_window_left_separator_inverse" "no")
|
||||
local window_right_separator=$(get_tmux_option "@catppuccin_window_right_separator" "█")
|
||||
local window_right_separator_inverse=$(get_tmux_option "@catppuccin_window_right_separator_inverse" "no")
|
||||
local window_middle_separator=$(get_tmux_option "@catppuccin_window_middle_separator" "█ ")
|
||||
local window_number_position=$(get_tmux_option "@catppuccin_window_number_position" "left") # right, left
|
||||
local window_status_enable=$(get_tmux_option "@catppuccin_window_status_enable" "no") # right, left
|
||||
|
@ -320,7 +307,6 @@ main() {
|
|||
setw window-status-current-format "$window_current_format"
|
||||
|
||||
local status_left_separator=$(get_tmux_option "@catppuccin_status_left_separator" "")
|
||||
local status_left_separator_inverse=$(get_tmux_option "@catppuccin_status_left_separator_inverse" "no")
|
||||
local status_right_separator=$(get_tmux_option "@catppuccin_status_right_separator" "█")
|
||||
local status_right_separator_inverse=$(get_tmux_option "@catppuccin_status_right_separator_inverse" "no")
|
||||
local status_connect_separator=$(get_tmux_option "@catppuccin_status_connect_separator" "yes")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue