This reverts commit 3c6f6f282b
.
This commit is contained in:
parent
a2dda02b43
commit
e2a1043f42
21 changed files with 134 additions and 369 deletions
|
@ -1,8 +1,5 @@
|
||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
|
||||||
show_window_status=
|
|
||||||
|
|
||||||
build_window_format() {
|
build_window_format() {
|
||||||
local number="$1"
|
local number="$1"
|
||||||
local color="$2"
|
local color="$2"
|
||||||
|
@ -96,56 +93,34 @@ build_window_format() {
|
||||||
}
|
}
|
||||||
|
|
||||||
build_window_icon() {
|
build_window_icon() {
|
||||||
# Only update `show_window_status` if it's not empty
|
local window_status_icon_enable custom_icon_window_last \
|
||||||
# this module is ran twice once for current and once for default
|
custom_icon_window_zoom custom_icon_window_mark custom_icon_window_mark \
|
||||||
# meaning 2 calls to build_window_icon wich will/should both return the same
|
custom_icon_window_silent custom_icon_window_activity custom_icon_window_bell
|
||||||
# result.
|
|
||||||
if [ -z "$show_window_status" ]; then
|
|
||||||
local window_status_icon_enable custom_icon_window_last \
|
|
||||||
custom_icon_window_zoom custom_icon_window_mark custom_icon_window_mark \
|
|
||||||
custom_icon_window_silent custom_icon_window_activity custom_icon_window_bell
|
|
||||||
|
|
||||||
# shellcheck disable=SC2034
|
window_status_icon_enable=$(get_tmux_option "@catppuccin_window_status_icon_enable" "yes")
|
||||||
local tmux_batch_options_commands=()
|
custom_icon_window_last=$(get_tmux_option "@catppuccin_icon_window_last" "")
|
||||||
# shellcheck disable=SC2034
|
custom_icon_window_current=$(get_tmux_option "@catppuccin_icon_window_current" "")
|
||||||
local tmux_batch_options=()
|
custom_icon_window_zoom=$(get_tmux_option "@catppuccin_icon_window_zoom" "")
|
||||||
|
custom_icon_window_mark=$(get_tmux_option "@catppuccin_icon_window_mark" "")
|
||||||
|
custom_icon_window_silent=$(get_tmux_option "@catppuccin_icon_window_silent" "")
|
||||||
|
custom_icon_window_activity=$(get_tmux_option "@catppuccin_icon_window_activity" "")
|
||||||
|
custom_icon_window_bell=$(get_tmux_option "@catppuccin_icon_window_bell" "")
|
||||||
|
|
||||||
add_tmux_batch_option "@catppuccin_window_status_icon_enable"
|
if [ "$window_status_icon_enable" = "yes" ]; then
|
||||||
add_tmux_batch_option "@catppuccin_icon_window_last"
|
# #!~[*-]MZ
|
||||||
add_tmux_batch_option "@catppuccin_icon_window_current"
|
local show_window_status=""
|
||||||
add_tmux_batch_option "@catppuccin_icon_window_zoom"
|
show_window_status+="#{?window_activity_flag, ${custom_icon_window_activity},}"
|
||||||
add_tmux_batch_option "@catppuccin_icon_window_mark"
|
show_window_status+="#{?window_bell_flag, ${custom_icon_window_bell},}"
|
||||||
add_tmux_batch_option "@catppuccin_icon_window_silent"
|
show_window_status+="#{?window_silence_flag, ${custom_icon_window_silent},}"
|
||||||
add_tmux_batch_option "@catppuccin_icon_window_activity"
|
show_window_status+="#{?window_active, ${custom_icon_window_current},}"
|
||||||
add_tmux_batch_option "@catppuccin_icon_window_bell"
|
show_window_status+="#{?window_last_flag, ${custom_icon_window_last},}"
|
||||||
|
show_window_status+="#{?window_marked_flag, ${custom_icon_window_mark},}"
|
||||||
|
show_window_status+="#{?window_zoomed_flag, ${custom_icon_window_zoom},}"
|
||||||
|
|
||||||
run_tmux_batch_commands
|
fi
|
||||||
|
|
||||||
window_status_icon_enable=$(get_tmux_batch_option "@catppuccin_window_status_icon_enable" "yes")
|
if [ "$window_status_icon_enable" = "no" ]; then
|
||||||
custom_icon_window_last=$(get_tmux_batch_option "@catppuccin_icon_window_last" "")
|
local show_window_status=" #F"
|
||||||
custom_icon_window_current=$(get_tmux_batch_option "@catppuccin_icon_window_current" "")
|
|
||||||
custom_icon_window_zoom=$(get_tmux_batch_option "@catppuccin_icon_window_zoom" "")
|
|
||||||
custom_icon_window_mark=$(get_tmux_batch_option "@catppuccin_icon_window_mark" "")
|
|
||||||
custom_icon_window_silent=$(get_tmux_batch_option "@catppuccin_icon_window_silent" "")
|
|
||||||
custom_icon_window_activity=$(get_tmux_batch_option "@catppuccin_icon_window_activity" "")
|
|
||||||
custom_icon_window_bell=$(get_tmux_batch_option "@catppuccin_icon_window_bell" "")
|
|
||||||
|
|
||||||
if [ "$window_status_icon_enable" = "yes" ]; then
|
|
||||||
# #!~[*-]MZ
|
|
||||||
show_window_status=""
|
|
||||||
show_window_status+="#{?window_activity_flag, ${custom_icon_window_activity},}"
|
|
||||||
show_window_status+="#{?window_bell_flag, ${custom_icon_window_bell},}"
|
|
||||||
show_window_status+="#{?window_silence_flag, ${custom_icon_window_silent},}"
|
|
||||||
show_window_status+="#{?window_active, ${custom_icon_window_current},}"
|
|
||||||
show_window_status+="#{?window_last_flag, ${custom_icon_window_last},}"
|
|
||||||
show_window_status+="#{?window_marked_flag, ${custom_icon_window_mark},}"
|
|
||||||
show_window_status+="#{?window_zoomed_flag, ${custom_icon_window_zoom},}"
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$window_status_icon_enable" = "no" ]; then
|
|
||||||
show_window_status=" #F"
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "$show_window_status"
|
echo "$show_window_status"
|
||||||
|
|
|
@ -21,19 +21,9 @@ main() {
|
||||||
# Aggregate all commands in one array
|
# Aggregate all commands in one array
|
||||||
local tmux_commands=()
|
local tmux_commands=()
|
||||||
|
|
||||||
# Aggregate all tmux option for tmux_batch_option
|
|
||||||
local tmux_batch_options_commands=()
|
|
||||||
local tmux_batch_options=()
|
|
||||||
|
|
||||||
# Batch options for loading the colorscheme and everyting before
|
|
||||||
add_tmux_batch_option "@catppuccin_custom_plugin_dir"
|
|
||||||
add_tmux_batch_option "@catppuccin_flavour"
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
# module directories
|
# module directories
|
||||||
local custom_path modules_custom_path modules_status_path modules_window_path modules_pane_path
|
local custom_path modules_custom_path modules_status_path modules_window_path modules_pane_path
|
||||||
custom_path="$(get_tmux_batch_option "@catppuccin_custom_plugin_dir" "${PLUGIN_DIR}/custom")"
|
custom_path="$(get_tmux_option "@catppuccin_custom_plugin_dir" "${PLUGIN_DIR}/custom")"
|
||||||
modules_custom_path=$custom_path
|
modules_custom_path=$custom_path
|
||||||
modules_status_path=$PLUGIN_DIR/status
|
modules_status_path=$PLUGIN_DIR/status
|
||||||
modules_window_path=$PLUGIN_DIR/window
|
modules_window_path=$PLUGIN_DIR/window
|
||||||
|
@ -44,7 +34,7 @@ main() {
|
||||||
local color_interpolation=()
|
local color_interpolation=()
|
||||||
local color_values=()
|
local color_values=()
|
||||||
local temp
|
local temp
|
||||||
theme="$(get_tmux_batch_option "@catppuccin_flavour" "mocha")"
|
theme="$(get_tmux_option "@catppuccin_flavour" "mocha")"
|
||||||
# NOTE: Pulling in the selected theme by the theme that's being set as local
|
# NOTE: Pulling in the selected theme by the theme that's being set as local
|
||||||
# variables.
|
# variables.
|
||||||
# https://github.com/dylanaraps/pure-sh-bible#parsing-a-keyval-file
|
# https://github.com/dylanaraps/pure-sh-bible#parsing-a-keyval-file
|
||||||
|
@ -65,44 +55,16 @@ main() {
|
||||||
color_values+=("${temp}")
|
color_values+=("${temp}")
|
||||||
done <"${PLUGIN_DIR}/themes/catppuccin_${theme}.tmuxtheme"
|
done <"${PLUGIN_DIR}/themes/catppuccin_${theme}.tmuxtheme"
|
||||||
|
|
||||||
# Batch options for `./catppuccin.tmux`
|
|
||||||
add_tmux_batch_option "@catppuccin_status_default"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_justify"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_background"
|
|
||||||
add_tmux_batch_option "@catppuccin_menu_style"
|
|
||||||
add_tmux_batch_option "@catppuccin_menu_selected_style"
|
|
||||||
add_tmux_batch_option "@catppuccin_menu_border_style"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_status_enabled"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_border_status"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_left_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_middle_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_right_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_number_position"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_left_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_right_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_middle_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_number_position"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_status_enable"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_left_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_right_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_connect_separator"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_fill"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_modules_left"
|
|
||||||
add_tmux_batch_option "@catppuccin_status_modules_right"
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
# status general
|
# status general
|
||||||
local status_default status_justify status_background message_background
|
local status_default status_justify status_background message_background
|
||||||
status_default=$(get_tmux_batch_option "@catppuccin_status_default" "on")
|
status_default=$(get_tmux_option "@catppuccin_status_default" "on")
|
||||||
# shellcheck disable=SC2121
|
# shellcheck disable=SC2121
|
||||||
set status "$status_default"
|
set status "$status_default"
|
||||||
|
|
||||||
status_justify=$(get_tmux_batch_option "@catppuccin_status_justify" "left")
|
status_justify=$(get_tmux_option "@catppuccin_status_justify" "left")
|
||||||
set status-justify "$status_justify"
|
set status-justify "$status_justify"
|
||||||
|
|
||||||
status_background=$(get_tmux_batch_option "@catppuccin_status_background" "theme")
|
status_background=$(get_tmux_option "@catppuccin_status_background" "theme")
|
||||||
if [ "${status_background}" = "theme" ]; then
|
if [ "${status_background}" = "theme" ]; then
|
||||||
set status-bg "${thm_bg}"
|
set status-bg "${thm_bg}"
|
||||||
message_background="${thm_gray}"
|
message_background="${thm_gray}"
|
||||||
|
@ -125,9 +87,9 @@ main() {
|
||||||
|
|
||||||
# menu
|
# menu
|
||||||
local menu_style menu_selected_style menu_border_style
|
local menu_style menu_selected_style menu_border_style
|
||||||
menu_style=$(get_interpolated_tmux_batch_option "@catppuccin_menu_style" "default")
|
menu_style=$(get_interpolated_tmux_option "@catppuccin_menu_style" "default")
|
||||||
menu_selected_style=$(get_interpolated_tmux_batch_option "@catppuccin_menu_selected_style" "fg=${thm_gray},bg=${thm_yellow}")
|
menu_selected_style=$(get_interpolated_tmux_option "@catppuccin_menu_selected_style" "fg=${thm_gray},bg=${thm_yellow}")
|
||||||
menu_border_style=$(get_interpolated_tmux_batch_option "@catppuccin_menu_border_style" "default")
|
menu_border_style=$(get_interpolated_tmux_option "@catppuccin_menu_border_style" "default")
|
||||||
set menu-style "$menu_style"
|
set menu-style "$menu_style"
|
||||||
set menu-selected-style "$menu_selected_style"
|
set menu-selected-style "$menu_selected_style"
|
||||||
set menu-border-style "$menu_border_style"
|
set menu-border-style "$menu_border_style"
|
||||||
|
@ -136,19 +98,19 @@ main() {
|
||||||
local pane_border_status pane_border_style \
|
local pane_border_status pane_border_style \
|
||||||
pane_active_border_style pane_left_separator pane_middle_separator \
|
pane_active_border_style pane_left_separator pane_middle_separator \
|
||||||
pane_right_separator pane_number_position pane_format
|
pane_right_separator pane_number_position pane_format
|
||||||
pane_status_enable=$(get_tmux_batch_option "@catppuccin_pane_status_enabled" "no") # yes
|
pane_status_enable=$(get_tmux_option "@catppuccin_pane_status_enabled" "no") # yes
|
||||||
pane_border_status=$(get_tmux_batch_option "@catppuccin_pane_border_status" "off") # bottom
|
pane_border_status=$(get_tmux_option "@catppuccin_pane_border_status" "off") # bottom
|
||||||
pane_border_style=$(
|
pane_border_style=$(
|
||||||
get_interpolated_tmux_batch_option "@catppuccin_pane_border_style" "fg=${thm_gray}"
|
get_interpolated_tmux_option "@catppuccin_pane_border_style" "fg=${thm_gray}"
|
||||||
)
|
)
|
||||||
pane_active_border_style=$(
|
pane_active_border_style=$(
|
||||||
get_interpolated_tmux_batch_option "@catppuccin_pane_active_border_style" \
|
get_interpolated_tmux_option "@catppuccin_pane_active_border_style" \
|
||||||
"#{?pane_in_mode,fg=${thm_yellow},#{?pane_synchronized,fg=${thm_magenta},fg=${thm_orange}}}"
|
"#{?pane_in_mode,fg=${thm_yellow},#{?pane_synchronized,fg=${thm_magenta},fg=${thm_orange}}}"
|
||||||
)
|
)
|
||||||
pane_left_separator=$(get_tmux_batch_option "@catppuccin_pane_left_separator" "█")
|
pane_left_separator=$(get_tmux_option "@catppuccin_pane_left_separator" "█")
|
||||||
pane_middle_separator=$(get_tmux_batch_option "@catppuccin_pane_middle_separator" "█")
|
pane_middle_separator=$(get_tmux_option "@catppuccin_pane_middle_separator" "█")
|
||||||
pane_right_separator=$(get_tmux_batch_option "@catppuccin_pane_right_separator" "█")
|
pane_right_separator=$(get_tmux_option "@catppuccin_pane_right_separator" "█")
|
||||||
pane_number_position=$(get_tmux_batch_option "@catppuccin_pane_number_position" "left") # right, left
|
pane_number_position=$(get_tmux_option "@catppuccin_pane_number_position" "left") # right, left
|
||||||
pane_format=$(load_modules "pane_default_format" "$modules_custom_path" "$modules_pane_path")
|
pane_format=$(load_modules "pane_default_format" "$modules_custom_path" "$modules_pane_path")
|
||||||
|
|
||||||
setw pane-border-status "$pane_border_status"
|
setw pane-border-status "$pane_border_status"
|
||||||
|
@ -161,14 +123,14 @@ main() {
|
||||||
window_middle_separator window_number_position window_status_enable \
|
window_middle_separator window_number_position window_status_enable \
|
||||||
window_format window_current_format
|
window_format window_current_format
|
||||||
|
|
||||||
window_status_separator=$(get_interpolated_tmux_batch_option "@catppuccin_window_separator" "")
|
window_status_separator=$(get_interpolated_tmux_option "@catppuccin_window_separator" "")
|
||||||
setw window-status-separator "$window_status_separator"
|
setw window-status-separator "$window_status_separator"
|
||||||
|
|
||||||
window_left_separator=$(get_tmux_batch_option "@catppuccin_window_left_separator" "█")
|
window_left_separator=$(get_tmux_option "@catppuccin_window_left_separator" "█")
|
||||||
window_right_separator=$(get_tmux_batch_option "@catppuccin_window_right_separator" "█")
|
window_right_separator=$(get_tmux_option "@catppuccin_window_right_separator" "█")
|
||||||
window_middle_separator=$(get_tmux_batch_option "@catppuccin_window_middle_separator" "█ ")
|
window_middle_separator=$(get_tmux_option "@catppuccin_window_middle_separator" "█ ")
|
||||||
window_number_position=$(get_tmux_batch_option "@catppuccin_window_number_position" "left") # right, left
|
window_number_position=$(get_tmux_option "@catppuccin_window_number_position" "left") # right, left
|
||||||
window_status_enable=$(get_tmux_batch_option "@catppuccin_window_status_enable" "no") # right, left
|
window_status_enable=$(get_tmux_option "@catppuccin_window_status_enable" "no") # right, left
|
||||||
|
|
||||||
window_format=$(load_modules "window_default_format" "$modules_custom_path" "$modules_window_path")
|
window_format=$(load_modules "window_default_format" "$modules_custom_path" "$modules_window_path")
|
||||||
setw window-status-format "$(do_color_interpolation "$window_format")"
|
setw window-status-format "$(do_color_interpolation "$window_format")"
|
||||||
|
@ -179,16 +141,16 @@ main() {
|
||||||
# status module
|
# status module
|
||||||
local status_left_separator status_right_separator status_connect_separator \
|
local status_left_separator status_right_separator status_connect_separator \
|
||||||
status_fill status_modules_left status_modules_right
|
status_fill status_modules_left status_modules_right
|
||||||
status_left_separator=$(get_tmux_batch_option "@catppuccin_status_left_separator" "")
|
status_left_separator=$(get_tmux_option "@catppuccin_status_left_separator" "")
|
||||||
status_right_separator=$(get_tmux_batch_option "@catppuccin_status_right_separator" "█")
|
status_right_separator=$(get_tmux_option "@catppuccin_status_right_separator" "█")
|
||||||
status_connect_separator=$(get_tmux_batch_option "@catppuccin_status_connect_separator" "yes")
|
status_connect_separator=$(get_tmux_option "@catppuccin_status_connect_separator" "yes")
|
||||||
status_fill=$(get_tmux_batch_option "@catppuccin_status_fill" "icon")
|
status_fill=$(get_tmux_option "@catppuccin_status_fill" "icon")
|
||||||
|
|
||||||
status_modules_left=$(get_tmux_batch_option "@catppuccin_status_modules_left" "")
|
status_modules_left=$(get_tmux_option "@catppuccin_status_modules_left" "")
|
||||||
loaded_modules_left=$(load_modules "$status_modules_left" "$modules_custom_path" "$modules_status_path")
|
loaded_modules_left=$(load_modules "$status_modules_left" "$modules_custom_path" "$modules_status_path")
|
||||||
set status-left "$(do_color_interpolation "$loaded_modules_left")"
|
set status-left "$(do_color_interpolation "$loaded_modules_left")"
|
||||||
|
|
||||||
status_modules_right=$(get_tmux_batch_option "@catppuccin_status_modules_right" "application session")
|
status_modules_right=$(get_tmux_option "@catppuccin_status_modules_right" "application session")
|
||||||
loaded_modules_right=$(load_modules "$status_modules_right" "$modules_custom_path" "$modules_status_path")
|
loaded_modules_right=$(load_modules "$status_modules_right" "$modules_custom_path" "$modules_status_path")
|
||||||
set status-right "$(do_color_interpolation "$loaded_modules_right")"
|
set status-right "$(do_color_interpolation "$loaded_modules_right")"
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,11 @@
|
||||||
show_pane_default_format() {
|
show_pane_default_format() {
|
||||||
local number color background text fill
|
local number color background text fill
|
||||||
# shellcheck disable=SC2034
|
|
||||||
local tmux_batch_options_commands=()
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
local tmux_batch_options=()
|
|
||||||
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_color"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_background_color"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_default_text"
|
|
||||||
add_tmux_batch_option "@catppuccin_pane_default_fill"
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
number="#{pane_index}"
|
number="#{pane_index}"
|
||||||
color="$(get_tmux_batch_option "@catppuccin_pane_color" "$thm_green")"
|
color="$(get_tmux_option "@catppuccin_pane_color" "$thm_green")"
|
||||||
background="$(get_tmux_batch_option "@catppuccin_pane_background_color" "$thm_gray")"
|
background="$(get_tmux_option "@catppuccin_pane_background_color" "$thm_gray")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_pane_default_text" "#{b:pane_current_path}")"
|
text="$(get_tmux_option "@catppuccin_pane_default_text" "#{b:pane_current_path}")"
|
||||||
fill="$(get_tmux_batch_option "@catppuccin_pane_default_fill" "number")" # number, all, none
|
fill="$(get_tmux_option "@catppuccin_pane_default_fill" "number")" # number, all, none
|
||||||
|
|
||||||
default_pane_format=$(build_pane_format "$number" "$color" "$background" "$text" "$fill")
|
default_pane_format=$(build_pane_format "$number" "$color" "$background" "$text" "$fill")
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_application() {
|
show_application() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "application"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_application_icon" "")
|
icon=$(get_tmux_option "@catppuccin_application_icon" "")
|
||||||
color=$(get_tmux_batch_option "@catppuccin_application_color" "$thm_pink")
|
color=$(get_tmux_option "@catppuccin_application_color" "$thm_pink")
|
||||||
text=$(get_tmux_batch_option "@catppuccin_application_text" "#{pane_current_command}")
|
text=$(get_tmux_option "@catppuccin_application_text" "#{pane_current_command}")
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -1,28 +1,24 @@
|
||||||
show_battery() {
|
show_battery() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "battery"
|
|
||||||
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier8 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier7 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier6 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier5 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier4 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier3 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier2 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_charge_tier1 ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_charged ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_charging ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_discharging ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_unknown ;")
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @batt_icon_status_attached ;")
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_battery_icon" "#{battery_icon}")
|
icon=$(get_tmux_option "@catppuccin_battery_icon" "#{battery_icon}")
|
||||||
color=$(get_tmux_batch_option "@catppuccin_battery_color" "$thm_yellow")
|
color=$(get_tmux_option "@catppuccin_battery_color" "$thm_yellow")
|
||||||
text=$(get_tmux_batch_option "@catppuccin_battery_text" "#{battery_percentage}")
|
text=$(get_tmux_option "@catppuccin_battery_text" "#{battery_percentage}")
|
||||||
|
|
||||||
|
tmux set-option -g @batt_icon_charge_tier8 ''
|
||||||
|
tmux set-option -g @batt_icon_charge_tier7 ''
|
||||||
|
tmux set-option -g @batt_icon_charge_tier6 ''
|
||||||
|
tmux set-option -g @batt_icon_charge_tier5 ''
|
||||||
|
tmux set-option -g @batt_icon_charge_tier4 ''
|
||||||
|
tmux set-option -g @batt_icon_charge_tier3 ''
|
||||||
|
tmux set-option -g @batt_icon_charge_tier2 ''
|
||||||
|
tmux set-option -g @batt_icon_charge_tier1 ''
|
||||||
|
tmux set-option -g @batt_icon_status_charged ''
|
||||||
|
tmux set-option -g @batt_icon_status_charging ''
|
||||||
|
tmux set-option -g @batt_icon_status_discharging ''
|
||||||
|
tmux set-option -g @batt_icon_status_unknown ''
|
||||||
|
tmux set-option -g @batt_icon_status_attached ""
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -2,13 +2,10 @@
|
||||||
show_clima() {
|
show_clima() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "clima"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon="$(get_tmux_batch_option "@catppuccin_clima_icon" "")"
|
icon="$(get_tmux_option "@catppuccin_clima_icon" "")"
|
||||||
color="$(get_tmux_batch_option "@catppuccin_clima_color" "$thm_yellow")"
|
color="$(get_tmux_option "@catppuccin_clima_color" "$thm_yellow")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_clima_text" "#{clima}")"
|
text="$(get_tmux_option "@catppuccin_clima_text" "#{clima}")"
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
show_cpu() {
|
show_cpu() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "cpu"
|
|
||||||
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @cpu_low_bg_color $thm_yellow ;") # background color when cpu is low
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @cpu_medium_bg_color $thm_orange ;") # background color when cpu is medium
|
|
||||||
tmux_batch_options_commands+=("set-option -gq @cpu_high_bg_color $thm_red ;") # background color when cpu is high
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_cpu_icon" "")
|
icon=$(get_tmux_option "@catppuccin_cpu_icon" "")
|
||||||
color="$(get_tmux_batch_option "@catppuccin_cpu_color" "#{cpu_bg_color}")"
|
color="$(get_tmux_option "@catppuccin_cpu_color" "#{cpu_bg_color}")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_cpu_text" "#{cpu_percentage}")"
|
text="$(get_tmux_option "@catppuccin_cpu_text" "#{cpu_percentage}")"
|
||||||
|
|
||||||
|
tmux set-option -g @cpu_low_bg_color "$thm_yellow" # background color when cpu is low
|
||||||
|
tmux set-option -g @cpu_medium_bg_color "$thm_orange" # background color when cpu is medium
|
||||||
|
tmux set-option -g @cpu_high_bg_color "$thm_red" # background color when cpu is high
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_date_time() {
|
show_date_time() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "date_time"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon="$(get_tmux_batch_option "@catppuccin_date_time_icon" "")"
|
icon="$(get_tmux_option "@catppuccin_date_time_icon" "")"
|
||||||
color="$(get_tmux_batch_option "@catppuccin_date_time_color" "$thm_blue")"
|
color="$(get_tmux_option "@catppuccin_date_time_color" "$thm_blue")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_date_time_text" "%Y-%m-%d %H:%M")"
|
text="$(get_tmux_option "@catppuccin_date_time_text" "%Y-%m-%d %H:%M")"
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_directory() {
|
show_directory() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "directory"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_directory_icon" "")
|
icon=$(get_tmux_option "@catppuccin_directory_icon" "")
|
||||||
color=$(get_tmux_batch_option "@catppuccin_directory_color" "$thm_pink")
|
color=$(get_tmux_option "@catppuccin_directory_color" "$thm_pink")
|
||||||
text=$(get_tmux_batch_option "@catppuccin_directory_text" "#{b:pane_current_path}")
|
text=$(get_tmux_option "@catppuccin_directory_text" "#{b:pane_current_path}")
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,10 @@
|
||||||
show_gitmux() {
|
show_gitmux() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "gitmux"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon="$(get_tmux_batch_option "@catppuccin_gitmux_icon" "")"
|
icon="$(get_tmux_option "@catppuccin_gitmux_icon" "")"
|
||||||
color="$(get_tmux_batch_option "@catppuccin_gitmux_color" "$thm_green")"
|
color="$(get_tmux_option "@catppuccin_gitmux_color" "$thm_green")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_gitmux_text" "#(gitmux \"#{pane_current_path}\")")"
|
text="$(get_tmux_option "@catppuccin_gitmux_text" "#(gitmux \"#{pane_current_path}\")")"
|
||||||
|
|
||||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_host() {
|
show_host() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "host"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_host_icon" "")
|
icon=$(get_tmux_option "@catppuccin_host_icon" "")
|
||||||
color=$(get_tmux_batch_option "@catppuccin_host_color" "$thm_magenta")
|
color=$(get_tmux_option "@catppuccin_host_color" "$thm_magenta")
|
||||||
text=$(get_tmux_batch_option "@catppuccin_host_text" "#H")
|
text=$(get_tmux_option "@catppuccin_host_text" "#H")
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -3,22 +3,15 @@
|
||||||
show_kube() {
|
show_kube() {
|
||||||
local index icon color text context_color namespace_color symbol_enabled module
|
local index icon color text context_color namespace_color symbol_enabled module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "kube"
|
|
||||||
|
|
||||||
add_tmux_batch_option "@catppuccin_kube_context_color"
|
|
||||||
add_tmux_batch_option "@catppuccin_kube_namespace_color"
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_kube_icon" "")
|
icon=$(get_tmux_option "@catppuccin_kube_icon" "")
|
||||||
color=$(get_tmux_batch_option "@catppuccin_kube_color" "$thm_blue")
|
color=$(get_tmux_option "@catppuccin_kube_color" "$thm_blue")
|
||||||
context_color=$(get_tmux_batch_option "@catppuccin_kube_context_color" "#{thm_red}")
|
context_color=$(get_tmux_option "@catppuccin_kube_context_color" "#{thm_red}")
|
||||||
namespace_color=$(get_tmux_batch_option "@catppuccin_kube_namespace_color" "#{thm_cyan}")
|
namespace_color=$(get_tmux_option "@catppuccin_kube_namespace_color" "#{thm_cyan}")
|
||||||
symbol_enabled=${KUBE_TMUX_SYMBOL_ENABLE:-false}
|
symbol_enabled=${KUBE_TMUX_SYMBOL_ENABLE:-false}
|
||||||
text=$(get_tmux_batch_option "@catppuccin_kube_text" "#(KUBE_TMUX_SYMBOL_ENABLE=$symbol_enabled ${TMUX_PLUGIN_MANAGER_PATH}kube-tmux/kube.tmux 250 '$context_color' '$namespace_color')")
|
text=$(get_tmux_option "@catppuccin_kube_text" "#(KUBE_TMUX_SYMBOL_ENABLE=$symbol_enabled ${TMUX_PLUGIN_MANAGER_PATH}kube-tmux/kube.tmux 250 '$context_color' '$namespace_color')")
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||||
|
|
||||||
echo "$module"
|
echo "$module"
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_load() {
|
show_load() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "load"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon="$(get_tmux_batch_option "@catppuccin_load_icon" "")"
|
icon="$(get_tmux_option "@catppuccin_load_icon" "")"
|
||||||
color="$(get_tmux_batch_option "@catppuccin_load_color" "$thm_blue")"
|
color="$(get_tmux_option "@catppuccin_load_color" "$thm_blue")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_load_text" "#{load_full}")"
|
text="$(get_tmux_option "@catppuccin_load_text" "#{load_full}")"
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,10 @@
|
||||||
show_pomodoro_plus() {
|
show_pomodoro_plus() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "pomodoro_plus"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon="$( get_tmux_batch_option "@catppuccin_pomodoro_plus_icon" "" )"
|
icon="$( get_tmux_option "@catppuccin_pomodoro_plus_icon" "" )"
|
||||||
color="$( get_tmux_batch_option "@catppuccin_pomodoro_plus_color" "$thm_orange" )"
|
color="$( get_tmux_option "@catppuccin_pomodoro_plus_color" "$thm_orange" )"
|
||||||
text="$( get_tmux_batch_option "@catppuccin_pomodoro_plus_text" "#{pomodoro_status}" )"
|
text="$( get_tmux_option "@catppuccin_pomodoro_plus_text" "#{pomodoro_status}" )"
|
||||||
|
|
||||||
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
module=$( build_status_module "$index" "$icon" "$color" "$text" )
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_session() {
|
show_session() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "session"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_session_icon" "")
|
icon=$(get_tmux_option "@catppuccin_session_icon" "")
|
||||||
color=$(get_tmux_batch_option "@catppuccin_session_color" "#{?client_prefix,$thm_red,$thm_green}")
|
color=$(get_tmux_option "@catppuccin_session_color" "#{?client_prefix,$thm_red,$thm_green}")
|
||||||
text=$(get_tmux_batch_option "@catppuccin_session_text" "#S")
|
text=$(get_tmux_option "@catppuccin_session_text" "#S")
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_uptime() {
|
show_uptime() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "uptime"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon="$(get_tmux_batch_option "@catppuccin_uptime_icon" "")"
|
icon="$(get_tmux_option "@catppuccin_uptime_icon" "")"
|
||||||
color="$(get_tmux_batch_option "@catppuccin_uptime_color" "$thm_green")"
|
color="$(get_tmux_option "@catppuccin_uptime_color" "$thm_green")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_uptime_text" "#(uptime | sed 's/^[^,]*up *//; s/, *[[:digit:]]* user.*//; s/ day.*, */d /; s/:/h /; s/ min//; s/$/m/')")"
|
text="$(get_tmux_option "@catppuccin_uptime_text" "#(uptime | sed 's/^[^,]*up *//; s/, *[[:digit:]]* user.*//; s/ day.*, */d /; s/:/h /; s/ min//; s/$/m/')")"
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,10 @@
|
||||||
show_user() {
|
show_user() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "user"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon=$(get_tmux_batch_option "@catppuccin_user_icon" "")
|
icon=$(get_tmux_option "@catppuccin_user_icon" "")
|
||||||
color=$(get_tmux_batch_option "@catppuccin_user_color" "$thm_cyan")
|
color=$(get_tmux_option "@catppuccin_user_color" "$thm_cyan")
|
||||||
text=$(get_tmux_batch_option "@catppuccin_user_text" "#(whoami)")
|
text=$(get_tmux_option "@catppuccin_user_text" "#(whoami)")
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -3,13 +3,10 @@
|
||||||
show_weather() {
|
show_weather() {
|
||||||
local index icon color text module
|
local index icon color text module
|
||||||
|
|
||||||
tmux_batch_setup_status_module "weather"
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
index=$1
|
index=$1
|
||||||
icon="$(get_tmux_batch_option "@catppuccin_weather_icon" "")"
|
icon="$(get_tmux_option "@catppuccin_weather_icon" "")"
|
||||||
color="$(get_tmux_batch_option "@catppuccin_weather_color" "$thm_yellow")"
|
color="$(get_tmux_option "@catppuccin_weather_color" "$thm_yellow")"
|
||||||
text="$(get_tmux_batch_option "@catppuccin_weather_text" "#{weather}")"
|
text="$(get_tmux_option "@catppuccin_weather_text" "#{weather}")"
|
||||||
|
|
||||||
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
module=$(build_status_module "$index" "$icon" "$color" "$text")
|
||||||
|
|
||||||
|
|
|
@ -18,9 +18,11 @@ get_tmux_option() {
|
||||||
if [ "$value" = "null" ]
|
if [ "$value" = "null" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$value"
|
echo "$value"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$default"
|
echo "$default"
|
||||||
|
|
||||||
|
@ -38,9 +40,11 @@ get_interpolated_tmux_option() {
|
||||||
if [ "$value" = "null" ]
|
if [ "$value" = "null" ]
|
||||||
then
|
then
|
||||||
echo ""
|
echo ""
|
||||||
|
|
||||||
else
|
else
|
||||||
do_color_interpolation "$value"
|
do_color_interpolation "$value"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
echo "$default"
|
echo "$default"
|
||||||
fi
|
fi
|
||||||
|
@ -57,95 +61,3 @@ setw() {
|
||||||
local value=$2
|
local value=$2
|
||||||
tmux_commands+=(set-window-option -gq "$option" "$value" ";")
|
tmux_commands+=(set-window-option -gq "$option" "$value" ";")
|
||||||
}
|
}
|
||||||
|
|
||||||
get_tmux_batch_option() {
|
|
||||||
local option default value
|
|
||||||
option="$1"
|
|
||||||
default="$2"
|
|
||||||
|
|
||||||
for option_index in "${!tmux_batch_options[@]}"; do
|
|
||||||
IFS=":" read -r read_option read_value <<<"${tmux_batch_options[$option_index]}"
|
|
||||||
if [[ "$read_option" == "$option" ]]; then
|
|
||||||
echo "$read_value"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$default"
|
|
||||||
}
|
|
||||||
|
|
||||||
get_interpolated_tmux_batch_option() {
|
|
||||||
local option default value
|
|
||||||
option="$1"
|
|
||||||
default="$2"
|
|
||||||
|
|
||||||
for option_index in "${!tmux_batch_options[@]}"; do
|
|
||||||
IFS=":" read -r read_option read_value <<<"${tmux_batch_options[$option_index]}"
|
|
||||||
if [[ "$read_option" == "$option" ]]; then
|
|
||||||
do_color_interpolation "$read_value"
|
|
||||||
return
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
echo "$default"
|
|
||||||
}
|
|
||||||
|
|
||||||
add_tmux_batch_option() {
|
|
||||||
local option
|
|
||||||
option="$1"
|
|
||||||
|
|
||||||
tmux_batch_options_commands+=("show-option -gq $option ;")
|
|
||||||
}
|
|
||||||
|
|
||||||
set_tmux_batch_option() {
|
|
||||||
local option value
|
|
||||||
option="$1"
|
|
||||||
value="$2"
|
|
||||||
|
|
||||||
# NOTE: don't check for duplicates just append
|
|
||||||
# for option_index in "${!tmux_batch_options[@]}"; do
|
|
||||||
# read -d ':' -r read_option <<<"${tmux_batch_options[$option_index]}"
|
|
||||||
# if [[ "$read_option" == "$option" ]]; then
|
|
||||||
# tmux_batch_options["$option_index"]="$option:$value"
|
|
||||||
# return
|
|
||||||
# fi
|
|
||||||
# done
|
|
||||||
|
|
||||||
tmux_batch_options+=("$option:$value")
|
|
||||||
}
|
|
||||||
|
|
||||||
run_tmux_batch_commands() {
|
|
||||||
local temp
|
|
||||||
|
|
||||||
# shellcheck disable=SC2048,SC2086
|
|
||||||
while IFS=' ' read -r option value; do
|
|
||||||
if [ -n "$value" ]; then
|
|
||||||
if [ "$value" = "null" ]; then
|
|
||||||
set_tmux_batch_option "$option" ""
|
|
||||||
else
|
|
||||||
temp="${value%\"}"
|
|
||||||
temp="${temp#\"}"
|
|
||||||
set_tmux_batch_option "$option" "$temp"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
done < <(tmux ${tmux_batch_options_commands[*]})
|
|
||||||
|
|
||||||
tmux_batch_options_commands=()
|
|
||||||
}
|
|
||||||
|
|
||||||
tmux_batch_setup_status_module() {
|
|
||||||
local name="$1"
|
|
||||||
|
|
||||||
# Don't want to run commands set before since we can't update
|
|
||||||
# `tmux_batch_options` for it
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
tmux_batch_options_commands=()
|
|
||||||
|
|
||||||
# No need to check previous options
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
tmux_batch_options=()
|
|
||||||
|
|
||||||
add_tmux_batch_option "@catppuccin_${name}_icon"
|
|
||||||
add_tmux_batch_option "@catppuccin_${name}_color"
|
|
||||||
add_tmux_batch_option "@catppuccin_${name}_text"
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,22 +1,11 @@
|
||||||
show_window_current_format() {
|
show_window_current_format() {
|
||||||
local number color background text fill current_window_format
|
local number color background text fill current_window_format
|
||||||
# shellcheck disable=SC2034
|
|
||||||
local tmux_batch_options_commands=()
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
local tmux_batch_options=()
|
|
||||||
|
|
||||||
add_tmux_batch_option "@catppuccin_window_current_color"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_current_background"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_current_text"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_current_fill"
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
number="#I"
|
number="#I"
|
||||||
color=$(get_tmux_batch_option "@catppuccin_window_current_color" "$thm_orange")
|
color=$(get_tmux_option "@catppuccin_window_current_color" "$thm_orange")
|
||||||
background=$(get_tmux_batch_option "@catppuccin_window_current_background" "$thm_bg")
|
background=$(get_tmux_option "@catppuccin_window_current_background" "$thm_bg")
|
||||||
text="$(get_tmux_batch_option "@catppuccin_window_current_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
text="$(get_tmux_option "@catppuccin_window_current_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
||||||
fill="$(get_tmux_batch_option "@catppuccin_window_current_fill" "number")" # number, all, none
|
fill="$(get_tmux_option "@catppuccin_window_current_fill" "number")" # number, all, none
|
||||||
|
|
||||||
current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
|
current_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
|
||||||
|
|
||||||
|
|
|
@ -1,22 +1,11 @@
|
||||||
show_window_default_format() {
|
show_window_default_format() {
|
||||||
local number color background text fill default_window_format
|
local number color background text fill default_window_format
|
||||||
# shellcheck disable=SC2034
|
|
||||||
local tmux_batch_options_commands=()
|
|
||||||
# shellcheck disable=SC2034
|
|
||||||
local tmux_batch_options=()
|
|
||||||
|
|
||||||
add_tmux_batch_option "@catppuccin_window_default_color"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_default_background"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_default_text"
|
|
||||||
add_tmux_batch_option "@catppuccin_window_default_fill"
|
|
||||||
|
|
||||||
run_tmux_batch_commands
|
|
||||||
|
|
||||||
number="#I"
|
number="#I"
|
||||||
color=$(get_tmux_batch_option "@catppuccin_window_default_color" "$thm_blue")
|
color=$(get_tmux_option "@catppuccin_window_default_color" "$thm_blue")
|
||||||
background=$(get_tmux_batch_option "@catppuccin_window_default_background" "$thm_gray")
|
background=$(get_tmux_option "@catppuccin_window_default_background" "$thm_gray")
|
||||||
text="$(get_tmux_batch_option "@catppuccin_window_default_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
text="$(get_tmux_option "@catppuccin_window_default_text" "#{b:pane_current_path}")" # use #W for application instead of directory
|
||||||
fill="$(get_tmux_batch_option "@catppuccin_window_default_fill" "number")" # number, all, none
|
fill="$(get_tmux_option "@catppuccin_window_default_fill" "number")" # number, all, none
|
||||||
|
|
||||||
default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
|
default_window_format=$(build_window_format "$number" "$color" "$background" "$text" "$fill")
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue