Add selectable PS1 styles

- Implement 5 bold styles and style config

- Prompt for style selection in installers
This commit is contained in:
2026-01-24 10:04:14 +00:00
parent da123e9574
commit a737cf90dd
3 changed files with 138 additions and 4 deletions

View File

@@ -25,6 +25,7 @@ install_ps1=1
install_banner=1
season_mode="dynamic"
season_choice=""
style_choice="aurora"
if [[ -t 0 ]]; then
echo "Install options:"
echo " 1) PS1 only"
@@ -69,6 +70,28 @@ if [[ -t 0 ]]; then
season_mode="dynamic"
;;
esac
echo
echo "Style presets:"
echo " 1) Aurora - Powerline blocks, seasonal palette, two-line"
echo " Preview: [date time user] > [@host /path]"
echo " 2) Neon - Magenta/cyan cyber blocks, high contrast"
echo " Preview: [user time] > [@host /path]"
echo " 3) Forge - Warm copper blocks, heavy frame"
echo " Preview: [date time user] > [@host /path]"
echo " 4) Circuit - Green scanline, minimal rails"
echo " Preview: [user time] - @host /path"
echo " 5) Mono - Clean monochrome, fast read"
echo " Preview: [date time user] @host /path"
read -r -p "Choose style [1]: " style_pick
case "${style_pick}" in
2) style_choice="neon" ;;
3) style_choice="forge" ;;
4) style_choice="circuit" ;;
5) style_choice="mono" ;;
""|1) style_choice="aurora" ;;
*) echo "Invalid choice, using aurora."; style_choice="aurora" ;;
esac
fi
fi
@@ -137,9 +160,13 @@ if [[ "$install_ps1" -eq 1 ]]; then
fi
} > /etc/ps1-season
chmod 0644 /etc/ps1-season
printf 'PS1_STYLE=%s\n' "$style_choice" > /etc/ps1-style
chmod 0644 /etc/ps1-style
else
rm -f "$DST_PS1"
rm -f /etc/ps1-season
rm -f /etc/ps1-style
fi
if [[ "$install_banner" -eq 1 ]]; then