Add holidays pack

- Add holiday themes, palettes, and emojis

- Add holidays option and layout selection in installers

- Update context JSONs for holiday pack
This commit is contained in:
2026-01-24 11:29:09 +00:00
parent 42124810b7
commit a462aa81f9
5 changed files with 408 additions and 32 deletions

View File

@@ -91,8 +91,9 @@ _ps1_season() {
# Style selection (aurora/neon/forge/circuit/mono)
# PS1_STYLE=aurora|neon|forge|circuit|mono
# PS1_STYLE_PACK=standard|contest
# PS1_STYLE_PACK=standard|contest|holiday
# PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time
# PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear
# Also reads config from /etc/ps1-style or ~/.config/ps1/style
_ps1_style_config() {
local cfg=""
@@ -110,6 +111,7 @@ _ps1_style_config() {
PS1_STYLE) export PS1_STYLE="$v" ;;
PS1_STYLE_PACK) export PS1_STYLE_PACK="$v" ;;
PS1_CONTEST_LAYOUT) export PS1_CONTEST_LAYOUT="$v" ;;
PS1_HOLIDAY) export PS1_HOLIDAY="$v" ;;
esac
done < "$cfg"
fi
@@ -133,6 +135,12 @@ _ps1_contest_layout() {
echo "$layout"
}
_ps1_holiday() {
_ps1_style_config
local holiday="${PS1_HOLIDAY:-christmas}"
echo "$holiday"
}
# Time-based emoji with seasonal accents (Europe/Oslo)
_ps1_pick_icon() {
local list_name="$1"
@@ -147,6 +155,12 @@ _ps1_pick_icon() {
spring) offset=11 ;;
summer) offset=23 ;;
autumn) offset=37 ;;
christmas) offset=61 ;;
easter) offset=73 ;;
halloween) offset=97 ;;
valentine) offset=109 ;;
thanksgiving) offset=131 ;;
newyear) offset=151 ;;
*) offset=0 ;;
esac
@@ -167,6 +181,7 @@ _ps1_symbol() {
local season="${__PS1_SEASON:-winter}"
local pack="${__PS1_STYLE_PACK:-standard}"
local holiday="${__PS1_HOLIDAY:-christmas}"
local rot_season="${season}"
local sunrise coffee work evening night
local -a sunrise_list work_list
@@ -176,6 +191,45 @@ _ps1_symbol() {
sunrise_list=( "⚡️" "🛰️" "🧬" "🧠" )
work_list=( "🛠️" "💾" "🧪" "🧩" )
coffee="☕"; evening="🎛️"; night="🕶️"
elif [[ "$pack" == "holiday" ]]; then
rot_season="$holiday"
case "$holiday" in
christmas)
sunrise_list=( "🎄" "🎅" "❄️" "⛄" )
work_list=( "🎁" "🧤" "🧣" "🦌" )
coffee="☕"; evening="🌟"; night="🕯️"
;;
easter)
sunrise_list=( "🐣" "🥚" "🌷" "🌤" )
work_list=( "🐰" "🌼" "🧺" "🍫" )
coffee="☕"; evening="🌅"; night="🌙"
;;
halloween)
sunrise_list=( "🎃" "🦇" "🌕" "🕸️" )
work_list=( "👻" "💀" "🕯️" "🧪" )
coffee="☕"; evening="🌆"; night="🕷️"
;;
valentine)
sunrise_list=( "💖" "🌹" "💘" "💕" )
work_list=( "💌" "🍫" "🕊️" "💗" )
coffee="☕"; evening="🌆"; night="🌙"
;;
thanksgiving)
sunrise_list=( "🦃" "🍁" "🥧" "🍂" )
work_list=( "🍽️" "🌾" "🧺" "🥖" )
coffee="☕"; evening="🌆"; night="🌙"
;;
newyear)
sunrise_list=( "🎆" "🥂" "🎇" "✨" )
work_list=( "🗓️" "⏳" "🚀" "✨" )
coffee="☕"; evening="🌆"; night="🌙"
;;
*)
sunrise_list=( "🎉" "✨" "🎊" "🌟" )
work_list=( "🧩" "🛠️" "💾" "🧪" )
coffee="☕"; evening="🌆"; night="🌙"
;;
esac
else
case "$season" in
spring)
@@ -238,6 +292,7 @@ __PS1_SEASON="winter"
__PS1_STYLE="aurora"
__PS1_STYLE_PACK="standard"
__PS1_CONTEST_LAYOUT="day-time-user"
__PS1_HOLIDAY="christmas"
_ps1_set_prompt() {
local RST="\[\e[0m\]"
@@ -251,6 +306,65 @@ _ps1_set_prompt() {
Z2_FG="\[\e[38;5;255m\]"
PATH_FG="\[\e[38;5;51m\]"
FRAME="\[\e[38;5;23m\]"
elif [[ "$__PS1_STYLE_PACK" == "holiday" ]]; then
case "$__PS1_HOLIDAY" in
christmas)
Z1_BG="\[\e[48;5;52m\]"
Z1_FG="\[\e[38;5;255m\]"
Z2_BG="\[\e[48;5;28m\]"
Z2_FG="\[\e[38;5;255m\]"
PATH_FG="\[\e[38;5;194m\]"
FRAME="\[\e[38;5;88m\]"
;;
easter)
Z1_BG="\[\e[48;5;186m\]"
Z1_FG="\[\e[38;5;16m\]"
Z2_BG="\[\e[48;5;150m\]"
Z2_FG="\[\e[38;5;16m\]"
PATH_FG="\[\e[38;5;94m\]"
FRAME="\[\e[38;5;143m\]"
;;
halloween)
Z1_BG="\[\e[48;5;53m\]"
Z1_FG="\[\e[38;5;255m\]"
Z2_BG="\[\e[48;5;166m\]"
Z2_FG="\[\e[38;5;16m\]"
PATH_FG="\[\e[38;5;16m\]"
FRAME="\[\e[38;5;89m\]"
;;
valentine)
Z1_BG="\[\e[48;5;198m\]"
Z1_FG="\[\e[38;5;255m\]"
Z2_BG="\[\e[48;5;205m\]"
Z2_FG="\[\e[38;5;255m\]"
PATH_FG="\[\e[38;5;224m\]"
FRAME="\[\e[38;5;162m\]"
;;
thanksgiving)
Z1_BG="\[\e[48;5;94m\]"
Z1_FG="\[\e[38;5;230m\]"
Z2_BG="\[\e[48;5;136m\]"
Z2_FG="\[\e[38;5;231m\]"
PATH_FG="\[\e[38;5;223m\]"
FRAME="\[\e[38;5;130m\]"
;;
newyear)
Z1_BG="\[\e[48;5;17m\]"
Z1_FG="\[\e[38;5;255m\]"
Z2_BG="\[\e[48;5;20m\]"
Z2_FG="\[\e[38;5;255m\]"
PATH_FG="\[\e[38;5;229m\]"
FRAME="\[\e[38;5;19m\]"
;;
*)
Z1_BG="\[\e[48;5;24m\]"
Z1_FG="\[\e[38;5;255m\]"
Z2_BG="\[\e[48;5;31m\]"
Z2_FG="\[\e[38;5;255m\]"
PATH_FG="\[\e[38;5;51m\]"
FRAME="\[\e[38;5;23m\]"
;;
esac
else
case "$__PS1_SEASON" in
spring)
@@ -316,7 +430,7 @@ _ps1_set_prompt() {
local HOST_PART="${L_HOST}"
local PATH_PART="${__PS1_PATH}"
local PATH_SEP=" "
if [[ "$__PS1_STYLE_PACK" == "contest" ]]; then
if [[ "$__PS1_STYLE_PACK" == "contest" || "$__PS1_STYLE_PACK" == "holiday" ]]; then
local layout="${__PS1_CONTEST_LAYOUT:-day-time-user}"
case "$layout" in
user-time) L1="\\u \\A" ;;
@@ -389,6 +503,7 @@ _ps1_update() {
__PS1_SEASON="$(_ps1_season)"
__PS1_STYLE_PACK="$(_ps1_style_pack)"
__PS1_CONTEST_LAYOUT="$(_ps1_contest_layout)"
__PS1_HOLIDAY="$(_ps1_holiday)"
__PS1_STYLE="$(_ps1_style)"
__PS1_SYM="$(_ps1_symbol)"
__PS1_PATH="$(_ps1_path)"