Add git capsule toggle across themes

This commit is contained in:
2026-01-24 14:30:34 +00:00
parent c039075927
commit d7c08d5a4c
4 changed files with 49 additions and 36 deletions

View File

@@ -164,16 +164,18 @@ if [[ -t 0 ]]; then
*) echo "Invalid choice, using aurora."; style_choice="aurora" ;;
esac
if [[ "$style_choice" == "hawolex" ]]; then
read -r -p "Enable git capsule? [y/N]: " git_pick
case "${git_pick}" in
y|Y) git_choice="1" ;;
*) git_choice="0" ;;
esac
fi
else
style_choice="aurora"
fi
read -r -p "Enable git capsule for all themes? [y/N]: " git_pick
case "${git_pick}" in
y|Y) git_choice="1" ;;
*) git_choice="0" ;;
esac
if [[ "$style_choice" == "git" ]]; then
git_choice="1"
fi
fi
fi
@@ -252,9 +254,7 @@ if [[ "$install_ps1" -eq 1 ]]; then
if [[ "$style_pack" == "holiday" ]]; then
printf 'PS1_HOLIDAY=%s\n' "${holiday_choice:-christmas}"
fi
if [[ "$style_choice" == "hawolex" ]]; then
printf 'PS1_GIT=%s\n' "$git_choice"
fi
printf 'PS1_GIT=%s\n' "$git_choice"
} > /etc/ps1-style
chmod 0644 /etc/ps1-style
else

View File

@@ -140,16 +140,18 @@ if [[ -t 0 ]]; then
*) echo "Invalid choice, using aurora."; style_choice="aurora" ;;
esac
if [[ "$style_choice" == "hawolex" ]]; then
read -r -p "Enable git capsule? [y/N]: " git_pick
case "${git_pick}" in
y|Y) git_choice="1" ;;
*) git_choice="0" ;;
esac
fi
else
style_choice="aurora"
fi
read -r -p "Enable git capsule for all themes? [y/N]: " git_pick
case "${git_pick}" in
y|Y) git_choice="1" ;;
*) git_choice="0" ;;
esac
if [[ "$style_choice" == "git" ]]; then
git_choice="1"
fi
fi
mkdir -p "$DST_DIR"
@@ -173,9 +175,7 @@ chmod 0644 "$SEASON_FILE"
if [[ "$style_pack" == "holiday" ]]; then
printf 'PS1_HOLIDAY=%s\n' "${holiday_choice:-christmas}"
fi
if [[ "$style_choice" == "hawolex" ]]; then
printf 'PS1_GIT=%s\n' "$git_choice"
fi
printf 'PS1_GIT=%s\n' "$git_choice"
} > "$STYLE_FILE"
chmod 0644 "$STYLE_FILE"