diff --git a/run_onchange_after_configure_tide.sh.tmpl b/run_onchange_after_configure_tide.sh.tmpl new file mode 100644 index 0000000..255fa31 --- /dev/null +++ b/run_onchange_after_configure_tide.sh.tmpl @@ -0,0 +1,20 @@ +#!/usr/bin/env bash +# Tide prompt configuration — re-runs when fish_plugins changes +# fish_plugins hash: {{ include "private_dot_config/private_fish/fish_plugins" | sha256sum }} + +set -e + +if ! command -v fish >/dev/null 2>&1; then + exit 0 +fi + +if ! fish -c "type -q tide" &>/dev/null; then + exit 0 +fi + +echo "Configuring tide prompt..." +fish -c "tide configure --auto --style=Classic --prompt_colors='True color' --classic_prompt_color=Dark --show_time='24-hour format' --classic_prompt_separators=Slanted --powerline_prompt_heads=Slanted --powerline_prompt_tails=Round --powerline_prompt_style='Two lines, frame' --prompt_connection=Disconnected --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Sparse --icons='Few icons' --transient=No" >/dev/null +fish -c "set -U tide_right_prompt_items (string match -v -- node \$tide_right_prompt_items)" +fish -c "set -U tide_right_prompt_items (string match -v -- gcloud \$tide_right_prompt_items)" +fish -c "set -U tide_right_prompt_items (string match -v -- kubectl \$tide_right_prompt_items)" +echo "Tide configured." diff --git a/run_onchange_after_install_main_deps.sh.tmpl b/run_onchange_after_install_main_deps.sh.tmpl index 37ae8d6..2865b5f 100644 --- a/run_onchange_after_install_main_deps.sh.tmpl +++ b/run_onchange_after_install_main_deps.sh.tmpl @@ -333,14 +333,6 @@ then fish -c "curl -sL https://raw.githubusercontent.com/jorgebucaran/fisher/main/functions/fisher.fish | source && fisher update" 2>&1|pad fi -new_line "Configuring tide prompt for fish" -fish -c "tide configure --auto --style=Classic --prompt_colors='True color' --classic_prompt_color=Dark --show_time='24-hour format' --classic_prompt_separators=Slanted --powerline_prompt_heads=Slanted --powerline_prompt_tails=Round --powerline_prompt_style='Two lines, frame' --prompt_connection=Disconnected --powerline_right_prompt_frame=No --prompt_connection_andor_frame_color=Darkest --prompt_spacing=Sparse --icons='Few icons' --transient=No" >/dev/null -fish -c "set -Ux tide_context_always_display true" -fish -c "set -U tide_right_prompt_items (string match -v -- node \$tide_right_prompt_items)" -fish -c "set -U tide_right_prompt_items (string match -v -- gcloud \$tide_right_prompt_items)" -fish -c "set -U tide_right_prompt_items (string match -v -- kubectl \$tide_right_prompt_items)" - - new_line "Change default shell to fish for user $USER" ## Change default shell to fish if [ "$(basename $SHELL)" != "fish" ]