From a462aa81f9cb1b095360dac64e458e2542683e68 Mon Sep 17 00:00:00 2001 From: steffen Date: Sat, 24 Jan 2026 11:29:09 +0000 Subject: [PATCH] Add holidays pack - Add holiday themes, palettes, and emojis - Add holidays option and layout selection in installers - Update context JSONs for holiday pack --- .context.json | 123 +++++++++++++++++++++-- contest-styles.json | 72 +++++++++++++ dotfiles/install/install-linux-global.sh | 83 +++++++++++---- dotfiles/install/install-macos-user.sh | 43 +++++++- dotfiles/ps1/ps1.sh | 119 +++++++++++++++++++++- 5 files changed, 408 insertions(+), 32 deletions(-) diff --git a/.context.json b/.context.json index 947a966..00648ec 100644 --- a/.context.json +++ b/.context.json @@ -38,10 +38,11 @@ "sources_from": "/etc/bash.bashrc", "prompts": [ "PS1 only / Banner only / Both", - "PS1 mode: Single season / Dynamic / Contest (if PS1 selected)", + "PS1 mode: Single season / Dynamic / Contest / Holidays (if PS1 selected)", "Season pick (if single season)", - "Contest layout selection (if contest)", - "Style preset selection (if contest)" + "Contest layout selection (if contest/holidays)", + "Style preset selection (if contest)", + "Holiday selection (if holidays)" ], "season_config_file": "/etc/ps1-season", "style_config_file": "/etc/ps1-style", @@ -58,10 +59,11 @@ "~/.bash_profile" ], "prompts": [ - "PS1 mode: Single season / Dynamic / Contest", + "PS1 mode: Single season / Dynamic / Contest / Holidays", "Season pick (if single season)", - "Contest layout selection (if contest)", - "Style preset selection (if contest)" + "Contest layout selection (if contest/holidays)", + "Style preset selection (if contest)", + "Holiday selection (if holidays)" ], "season_config_file": "~/.config/ps1/season", "style_config_file": "~/.config/ps1/style" @@ -162,11 +164,12 @@ } ], "config": { - "env": "PS1_STYLE=aurora|neon|forge|circuit|mono; PS1_STYLE_PACK=standard|contest; PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time", + "env": "PS1_STYLE=aurora|neon|forge|circuit|mono; 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", "config_file_keys": [ "PS1_STYLE", "PS1_STYLE_PACK", - "PS1_CONTEST_LAYOUT" + "PS1_CONTEST_LAYOUT", + "PS1_HOLIDAY" ] } }, @@ -263,6 +266,110 @@ "evening": "πŸŽ›οΈ", "night": "πŸ•ΆοΈ" }, + "holiday_accents": { + "christmas": { + "sunrise": [ + "πŸŽ„", + "πŸŽ…", + "❄️", + "β›„" + ], + "work": [ + "🎁", + "🧀", + "🧣", + "🦌" + ], + "coffee": "β˜•", + "evening": "🌟", + "night": "πŸ•―οΈ" + }, + "easter": { + "sunrise": [ + "🐣", + "πŸ₯š", + "🌷", + "🌀" + ], + "work": [ + "🐰", + "🌼", + "🧺", + "🍫" + ], + "coffee": "β˜•", + "evening": "πŸŒ…", + "night": "πŸŒ™" + }, + "halloween": { + "sunrise": [ + "πŸŽƒ", + "πŸ¦‡", + "πŸŒ•", + "πŸ•ΈοΈ" + ], + "work": [ + "πŸ‘»", + "πŸ’€", + "πŸ•―οΈ", + "πŸ§ͺ" + ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸ•·οΈ" + }, + "valentine": { + "sunrise": [ + "πŸ’–", + "🌹", + "πŸ’˜", + "πŸ’•" + ], + "work": [ + "πŸ’Œ", + "🍫", + "πŸ•ŠοΈ", + "πŸ’—" + ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸŒ™" + }, + "thanksgiving": { + "sunrise": [ + "πŸ¦ƒ", + "🍁", + "πŸ₯§", + "πŸ‚" + ], + "work": [ + "🍽️", + "🌾", + "🧺", + "πŸ₯–" + ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸŒ™" + }, + "newyear": { + "sunrise": [ + "πŸŽ†", + "πŸ₯‚", + "πŸŽ‡", + "✨" + ], + "work": [ + "πŸ—“οΈ", + "⏳", + "πŸš€", + "✨" + ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸŒ™" + } + }, "time_slots": { "sunrise": "05:00-08:59", "coffee": "09:00-10:59", diff --git a/contest-styles.json b/contest-styles.json index ef9732d..534b449 100644 --- a/contest-styles.json +++ b/contest-styles.json @@ -29,6 +29,78 @@ "night": "πŸ•ΆοΈ" } }, + "holiday_pack": { + "layout_options": [ + "day-time-user", + "user-time", + "time-user", + "day-time" + ], + "host_path_format": "@host - /path", + "prefix_newline": true, + "themes": { + "christmas": { + "palette": { "Z1_BG": 52, "Z1_FG": 255, "Z2_BG": 28, "Z2_FG": 255, "PATH_FG": 194, "FRAME": 88 }, + "emoji_set": { + "sunrise": [ "πŸŽ„", "πŸŽ…", "❄️", "β›„" ], + "work": [ "🎁", "🧀", "🧣", "🦌" ], + "coffee": "β˜•", + "evening": "🌟", + "night": "πŸ•―οΈ" + } + }, + "easter": { + "palette": { "Z1_BG": 186, "Z1_FG": 16, "Z2_BG": 150, "Z2_FG": 16, "PATH_FG": 94, "FRAME": 143 }, + "emoji_set": { + "sunrise": [ "🐣", "πŸ₯š", "🌷", "🌀" ], + "work": [ "🐰", "🌼", "🧺", "🍫" ], + "coffee": "β˜•", + "evening": "πŸŒ…", + "night": "πŸŒ™" + } + }, + "halloween": { + "palette": { "Z1_BG": 53, "Z1_FG": 255, "Z2_BG": 166, "Z2_FG": 16, "PATH_FG": 16, "FRAME": 89 }, + "emoji_set": { + "sunrise": [ "πŸŽƒ", "πŸ¦‡", "πŸŒ•", "πŸ•ΈοΈ" ], + "work": [ "πŸ‘»", "πŸ’€", "πŸ•―οΈ", "πŸ§ͺ" ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸ•·οΈ" + } + }, + "valentine": { + "palette": { "Z1_BG": 198, "Z1_FG": 255, "Z2_BG": 205, "Z2_FG": 255, "PATH_FG": 224, "FRAME": 162 }, + "emoji_set": { + "sunrise": [ "πŸ’–", "🌹", "πŸ’˜", "πŸ’•" ], + "work": [ "πŸ’Œ", "🍫", "πŸ•ŠοΈ", "πŸ’—" ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸŒ™" + } + }, + "thanksgiving": { + "palette": { "Z1_BG": 94, "Z1_FG": 230, "Z2_BG": 136, "Z2_FG": 231, "PATH_FG": 223, "FRAME": 130 }, + "emoji_set": { + "sunrise": [ "πŸ¦ƒ", "🍁", "πŸ₯§", "πŸ‚" ], + "work": [ "🍽️", "🌾", "🧺", "πŸ₯–" ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸŒ™" + } + }, + "newyear": { + "palette": { "Z1_BG": 17, "Z1_FG": 255, "Z2_BG": 20, "Z2_FG": 255, "PATH_FG": 229, "FRAME": 19 }, + "emoji_set": { + "sunrise": [ "πŸŽ†", "πŸ₯‚", "πŸŽ‡", "✨" ], + "work": [ "πŸ—“οΈ", "⏳", "πŸš€", "✨" ], + "coffee": "β˜•", + "evening": "πŸŒ†", + "night": "πŸŒ™" + } + } + } + }, "styles": [ { "id": "aurora", diff --git a/dotfiles/install/install-linux-global.sh b/dotfiles/install/install-linux-global.sh index 4270088..b31cd28 100644 --- a/dotfiles/install/install-linux-global.sh +++ b/dotfiles/install/install-linux-global.sh @@ -28,6 +28,7 @@ season_choice="" style_choice="aurora" style_pack="standard" contest_layout="day-time-user" +holiday_choice="christmas" if [[ -t 0 ]]; then echo "Install options:" echo " 1) PS1 only" @@ -43,13 +44,14 @@ if [[ -t 0 ]]; then if [[ "$install_ps1" -eq 1 ]]; then echo - echo "PS1 mode:" - echo " 1) Single season (static)" - echo " 2) Dynamic season (changing)" - echo " 3) Contest pack (static)" - read -r -p "Choose [3]: " season_mode_choice - case "${season_mode_choice}" in - 1) + echo "PS1 mode:" + echo " 1) Single season (static)" + echo " 2) Dynamic season (changing)" + echo " 3) Contest pack (static)" + echo " 4) Holidays pack (static)" + read -r -p "Choose [3]: " season_mode_choice + case "${season_mode_choice}" in + 1) season_mode="static" echo "Pick a season:" echo " 1) Winter" @@ -67,14 +69,14 @@ if [[ -t 0 ]]; then style_pack="standard" ;; - 2) - season_mode="dynamic" - style_pack="standard" - ;; - ""|3) - season_mode="static" - style_pack="contest" - contest_layout="day-time-user" + 2) + season_mode="dynamic" + style_pack="standard" + ;; + ""|3) + season_mode="static" + style_pack="contest" + contest_layout="day-time-user" echo "Contest layout order:" echo " 1) day-time-user" echo " 2) user-time" @@ -88,11 +90,47 @@ if [[ -t 0 ]]; then ""|1) contest_layout="day-time-user" ;; *) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;; esac - ;; - *) - echo "Invalid choice, using dynamic." - season_mode="dynamic" - style_pack="standard" + ;; + 4) + season_mode="dynamic" + style_pack="holiday" + echo "Holiday theme:" + echo " 1) Christmas" + echo " 2) Easter" + echo " 3) Halloween" + echo " 4) Valentine" + echo " 5) Thanksgiving" + echo " 6) New Year" + read -r -p "Choose [1]: " holiday_pick + case "${holiday_pick}" in + 2) holiday_choice="easter" ;; + 3) holiday_choice="halloween" ;; + 4) holiday_choice="valentine" ;; + 5) holiday_choice="thanksgiving" ;; + 6) holiday_choice="newyear" ;; + ""|1) holiday_choice="christmas" ;; + *) echo "Invalid choice, using christmas."; holiday_choice="christmas" ;; + esac + + contest_layout="day-time-user" + echo "Layout order:" + echo " 1) day-time-user" + echo " 2) user-time" + echo " 3) time-user" + echo " 4) day-time" + read -r -p "Choose [1]: " layout_pick + case "${layout_pick}" in + 2) contest_layout="user-time" ;; + 3) contest_layout="time-user" ;; + 4) contest_layout="day-time" ;; + ""|1) contest_layout="day-time-user" ;; + *) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;; + esac + ;; + *) + echo "Invalid choice, using dynamic." + season_mode="dynamic" + style_pack="standard" ;; esac @@ -193,9 +231,12 @@ if [[ "$install_ps1" -eq 1 ]]; then { printf 'PS1_STYLE=%s\n' "$style_choice" printf 'PS1_STYLE_PACK=%s\n' "$style_pack" - if [[ "$style_pack" == "contest" ]]; then + if [[ "$style_pack" == "contest" || "$style_pack" == "holiday" ]]; then printf 'PS1_CONTEST_LAYOUT=%s\n' "$contest_layout" fi + if [[ "$style_pack" == "holiday" ]]; then + printf 'PS1_HOLIDAY=%s\n' "${holiday_choice:-christmas}" + fi } > /etc/ps1-style chmod 0644 /etc/ps1-style else diff --git a/dotfiles/install/install-macos-user.sh b/dotfiles/install/install-macos-user.sh index 8cc14d0..d377a3c 100644 --- a/dotfiles/install/install-macos-user.sh +++ b/dotfiles/install/install-macos-user.sh @@ -17,12 +17,14 @@ season_mode="dynamic" season_choice="" style_choice="aurora" contest_layout="day-time-user" +holiday_choice="christmas" if [[ -t 0 ]]; then style_pack="standard" echo "PS1 mode:" echo " 1) Single season (static)" echo " 2) Dynamic season (changing)" echo " 3) Contest pack (static)" + echo " 4) Holidays pack (static)" read -r -p "Choose [3]: " season_mode_choice case "${season_mode_choice}" in 1) @@ -65,6 +67,42 @@ if [[ -t 0 ]]; then *) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;; esac ;; + 4) + season_mode="dynamic" + style_pack="holiday" + echo "Holiday theme:" + echo " 1) Christmas" + echo " 2) Easter" + echo " 3) Halloween" + echo " 4) Valentine" + echo " 5) Thanksgiving" + echo " 6) New Year" + read -r -p "Choose [1]: " holiday_pick + case "${holiday_pick}" in + 2) holiday_choice="easter" ;; + 3) holiday_choice="halloween" ;; + 4) holiday_choice="valentine" ;; + 5) holiday_choice="thanksgiving" ;; + 6) holiday_choice="newyear" ;; + ""|1) holiday_choice="christmas" ;; + *) echo "Invalid choice, using christmas."; holiday_choice="christmas" ;; + esac + + contest_layout="day-time-user" + echo "Layout order:" + echo " 1) day-time-user" + echo " 2) user-time" + echo " 3) time-user" + echo " 4) day-time" + read -r -p "Choose [1]: " layout_pick + case "${layout_pick}" in + 2) contest_layout="user-time" ;; + 3) contest_layout="time-user" ;; + 4) contest_layout="day-time" ;; + ""|1) contest_layout="day-time-user" ;; + *) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;; + esac + ;; *) echo "Invalid choice, using dynamic." season_mode="dynamic" @@ -114,9 +152,12 @@ chmod 0644 "$SEASON_FILE" { printf 'PS1_STYLE=%s\n' "$style_choice" printf 'PS1_STYLE_PACK=%s\n' "$style_pack" - if [[ "$style_pack" == "contest" ]]; then + if [[ "$style_pack" == "contest" || "$style_pack" == "holiday" ]]; then printf 'PS1_CONTEST_LAYOUT=%s\n' "$contest_layout" fi + if [[ "$style_pack" == "holiday" ]]; then + printf 'PS1_HOLIDAY=%s\n' "${holiday_choice:-christmas}" + fi } > "$STYLE_FILE" chmod 0644 "$STYLE_FILE" diff --git a/dotfiles/ps1/ps1.sh b/dotfiles/ps1/ps1.sh index 2f83d06..fed48a3 100644 --- a/dotfiles/ps1/ps1.sh +++ b/dotfiles/ps1/ps1.sh @@ -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)"