Skip to content

Commit

Permalink
perf: batch new options
Browse files Browse the repository at this point in the history
  • Loading branch information
vdbe committed Aug 5, 2024
1 parent 2454c95 commit e81518a
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
9 changes: 6 additions & 3 deletions catppuccin.tmux
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ main() {
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"
Expand Down Expand Up @@ -122,9 +125,9 @@ main() {

# menu
local menu_style menu_selected_style menu_border_style
menu_style=$(get_interpolated_tmux_option "@catppuccin_menu_style" "default")
menu_selected_style=$(get_interpolated_tmux_option "@catppuccin_menu_selected_style" "fg=${thm_gray},bg=${thm_yellow}")
menu_border_style=$(get_interpolated_tmux_option "@catppuccin_menu_border_style" "default")
menu_style=$(get_interpolated_tmux_batch_option "@catppuccin_menu_style" "default")
menu_selected_style=$(get_interpolated_tmux_batch_option "@catppuccin_menu_selected_style" "fg=${thm_gray},bg=${thm_yellow}")
menu_border_style=$(get_interpolated_tmux_batch_option "@catppuccin_menu_border_style" "default")
set menu-style "$menu_style"
set menu-selected-style "$menu_selected_style"
set menu-border-style "$menu_border_style"
Expand Down
12 changes: 6 additions & 6 deletions status/kube.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ show_kube() {
run_tmux_batch_commands

index=$1
icon=$(get_tmux_option "@catppuccin_kube_icon" "󱃾")
color=$(get_tmux_option "@catppuccin_kube_color" "$thm_blue")
context_color=$(get_tmux_option "@catppuccin_kube_context_color" "#{thm_red}")
namespace_color=$(get_tmux_option "@catppuccin_kube_namespace_color" "#{thm_cyan}")
icon=$(get_tmux_batch_option "@catppuccin_kube_icon" "󱃾")
color=$(get_tmux_batch_option "@catppuccin_kube_color" "$thm_blue")
context_color=$(get_tmux_batch_option "@catppuccin_kube_context_color" "#{thm_red}")
namespace_color=$(get_tmux_batch_option "@catppuccin_kube_namespace_color" "#{thm_cyan}")
symbol_enabled=${KUBE_TMUX_SYMBOL_ENABLE:-false}
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')")
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')")

module=$( build_status_module "$index" "$icon" "$color" "$text" )
module=$(build_status_module "$index" "$icon" "$color" "$text")

echo "$module"
}

0 comments on commit e81518a

Please sign in to comment.