Add seasonal palettes and selection prompts

- Implement dynamic/static season support in shared PS1

- Add season selection prompts to Linux and macOS installers
This commit is contained in:
2026-01-24 09:11:07 +00:00
parent dbeadcf1e4
commit 006a3add58
3 changed files with 178 additions and 12 deletions

View File

@@ -23,6 +23,8 @@ MARKER_END="# <<< dotfiles (managed) <<<"
# Select install mode (PS1, banner, or both)
install_ps1=1
install_banner=1
season_mode="dynamic"
season_choice=""
if [[ -t 0 ]]; then
echo "Install options:"
echo " 1) PS1 only"
@@ -35,6 +37,39 @@ if [[ -t 0 ]]; then
""|3) install_ps1=1; install_banner=1 ;;
*) echo "Invalid choice, using both."; install_ps1=1; install_banner=1 ;;
esac
if [[ "$install_ps1" -eq 1 ]]; then
echo
echo "Season mode:"
echo " 1) Dynamic (auto by date)"
echo " 2) Static (pick one season)"
read -r -p "Choose [1]: " season_mode_choice
case "${season_mode_choice}" in
2)
season_mode="static"
echo "Pick a season:"
echo " 1) Winter"
echo " 2) Spring"
echo " 3) Summer"
echo " 4) Autumn"
read -r -p "Choose [1]: " season_pick
case "${season_pick}" in
2) season_choice="spring" ;;
3) season_choice="summer" ;;
4) season_choice="autumn" ;;
""|1) season_choice="winter" ;;
*) echo "Invalid choice, using winter."; season_choice="winter" ;;
esac
;;
""|1)
season_mode="dynamic"
;;
*)
echo "Invalid choice, using dynamic."
season_mode="dynamic"
;;
esac
fi
fi
if [[ "$install_banner" -eq 1 ]]; then
@@ -94,8 +129,17 @@ fi
if [[ "$install_ps1" -eq 1 ]]; then
cp -f "$SRC_PS1" "$DST_PS1"
chmod 0644 "$DST_PS1"
{
printf 'PS1_SEASON_MODE=%s\n' "$season_mode"
if [[ "$season_mode" == "static" && -n "$season_choice" ]]; then
printf 'PS1_SEASON=%s\n' "$season_choice"
fi
} > /etc/ps1-season
chmod 0644 /etc/ps1-season
else
rm -f "$DST_PS1"
rm -f /etc/ps1-season
fi
if [[ "$install_banner" -eq 1 ]]; then