diff --git a/.context.json b/.context.json index 2b59f7b..b1e9b4d 100644 --- a/.context.json +++ b/.context.json @@ -196,6 +196,13 @@ "layout": "two-line, segmented gradient", "preview": "[date time user] @host - /path" }, + { + "id": "demo", + "name": "Demo", + "description": "Cycles through all styles each prompt.", + "layout": "two-line, auto-rotate", + "preview": "(auto-rotate)" + }, { "id": "radar", "name": "Radar", @@ -247,7 +254,7 @@ } ], "config": { - "env": "PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex|hawolexv2|radar|synthwave|noir|topo|glitch|arcticfire|acidlime; PS1_STYLE_PACK=standard|contest|holiday|custom; PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time; PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear; PS1_GIT=0|1", + "env": "PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex|hawolexv2|radar|synthwave|noir|topo|glitch|arcticfire|acidlime|demo; PS1_STYLE_PACK=standard|contest|holiday|custom; PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time; PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear; PS1_GIT=0|1", "config_file_keys": [ "PS1_STYLE", "PS1_STYLE_PACK", diff --git a/README.md b/README.md index eadc563..321dac7 100644 --- a/README.md +++ b/README.md @@ -181,6 +181,8 @@ Seven extra styles, built to be loud and expressive: - AcidLime: black + electric green Custom styles add a small context badge when relevant (`ssh`, `ctr`, `git`). + +Demo mode (screenshots): choose "Demo" to auto-cycle through all themes on each prompt. --- diff --git a/contest-styles.json b/contest-styles.json index ade2730..30208d0 100644 --- a/contest-styles.json +++ b/contest-styles.json @@ -266,27 +266,41 @@ "frame": 24 }, "preview": "[date time user] @host - /path" + }, + { + "id": "hawolexv2", + "name": "HawolexV2", + "tagline": "Winter neon gradient", + "description": "Multi-segment winter neon gradient with stronger separation.", + "layout": { + "line1": "date time user | @host | /path", + "line2": "status arrow + emoji" + }, + "colors": { + "zone1_bg": 54, + "zone2_bg": 55, + "zone3_bg": 56, + "zone4_bg": 31, + "zone5_bg": 30, + "zone_fg": 255, + "path_fg": 230, + "frame": 24 + }, + "preview": "[date time user] @host - /path" }, { - "id": "hawolexv2", - "name": "HawolexV2", - "tagline": "Winter neon gradient", - "description": "Multi-segment winter neon gradient with stronger separation.", + "id": "demo", + "name": "Demo", + "tagline": "Auto-rotate all themes", + "description": "Cycles through all themes each prompt for rapid screenshots.", "layout": { - "line1": "date time user | @host | /path", - "line2": "status arrow + emoji" + "line1": "auto", + "line2": "auto" }, "colors": { - "zone1_bg": 54, - "zone2_bg": 55, - "zone3_bg": 56, - "zone4_bg": 31, - "zone5_bg": 30, - "zone_fg": 255, - "path_fg": 230, - "frame": 24 + "note": "Uses each theme's native palette" }, - "preview": "[date time user] @host - /path" + "preview": "(auto-rotate)" }, { "id": "radar", diff --git a/dotfiles/install/install-linux-global.sh b/dotfiles/install/install-linux-global.sh index 45e12e9..1e7bee8 100644 --- a/dotfiles/install/install-linux-global.sh +++ b/dotfiles/install/install-linux-global.sh @@ -187,6 +187,8 @@ if [[ -t 0 ]]; then echo " Preview: [date time user] @host - /path" echo " 8) HawolexV2 - Winter neon gradient" echo " Preview: [date time user] @host - /path" + echo " 9) Demo - Cycles all themes every prompt" + echo " Preview: (auto-rotate)" read -r -p "Choose style [1]: " style_pick case "${style_pick}" in 2) style_choice="neon" ;; @@ -196,6 +198,7 @@ if [[ -t 0 ]]; then 6) style_choice="git" ;; 7) style_choice="hawolex" ;; 8) style_choice="hawolexv2" ;; + 9) style_choice="demo" ;; ""|1) style_choice="aurora" ;; *) echo "Invalid choice, using aurora."; style_choice="aurora" ;; esac diff --git a/dotfiles/install/install-macos-user.sh b/dotfiles/install/install-macos-user.sh index 79d5dfd..636ac5c 100644 --- a/dotfiles/install/install-macos-user.sh +++ b/dotfiles/install/install-macos-user.sh @@ -163,6 +163,8 @@ if [[ -t 0 ]]; then echo " Preview: [date time user] @host - /path" echo " 8) HawolexV2 - Winter neon gradient" echo " Preview: [date time user] @host - /path" + echo " 9) Demo - Cycles all themes every prompt" + echo " Preview: (auto-rotate)" read -r -p "Choose style [1]: " style_pick case "${style_pick}" in 2) style_choice="neon" ;; @@ -172,6 +174,7 @@ if [[ -t 0 ]]; then 6) style_choice="git" ;; 7) style_choice="hawolex" ;; 8) style_choice="hawolexv2" ;; + 9) style_choice="demo" ;; ""|1) style_choice="aurora" ;; *) echo "Invalid choice, using aurora."; style_choice="aurora" ;; esac diff --git a/dotfiles/ps1/ps1.sh b/dotfiles/ps1/ps1.sh index 7fe0d6c..c234d12 100644 --- a/dotfiles/ps1/ps1.sh +++ b/dotfiles/ps1/ps1.sh @@ -90,7 +90,7 @@ _ps1_season() { } # Style selection (aurora/neon/forge/circuit/mono/git/hawolex + custom pack) -# PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex|hawolexv2|radar|synthwave|noir|topo|glitch|arcticfire|acidlime +# PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex|hawolexv2|radar|synthwave|noir|topo|glitch|arcticfire|acidlime|demo # PS1_STYLE_PACK=standard|contest|holiday|custom # PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time # PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear @@ -211,6 +211,33 @@ _ps1_path_topo() { printf "%s" "$out" } +_ps1_demo_next() { + local styles=( + "aurora" "neon" "forge" "circuit" "mono" "git" "hawolex" "hawolexv2" + "aurora" "aurora" "aurora" "aurora" "aurora" "aurora" + "radar" "synthwave" "noir" "topo" "glitch" "arcticfire" "acidlime" + ) + local packs=( + "standard" "contest" "contest" "contest" "contest" "contest" "contest" "contest" + "holiday" "holiday" "holiday" "holiday" "holiday" "holiday" + "custom" "custom" "custom" "custom" "custom" "custom" "custom" + ) + local holidays=( + "" "" "" "" "" "" "" "" + "christmas" "easter" "halloween" "valentine" "thanksgiving" "newyear" + "" "" "" "" "" "" "" + ) + local count=${#styles[@]} + if [[ -z "${__PS1_DEMO_INDEX+x}" ]]; then + __PS1_DEMO_INDEX=0 + else + __PS1_DEMO_INDEX=$(( (__PS1_DEMO_INDEX + 1) % count )) + fi + __PS1_DEMO_STYLE="${styles[$__PS1_DEMO_INDEX]}" + __PS1_DEMO_PACK="${packs[$__PS1_DEMO_INDEX]}" + __PS1_DEMO_HOLIDAY="${holidays[$__PS1_DEMO_INDEX]}" +} + # ---- Load Git prompt helper (best effort) ---- __try_source_git_prompt() { local candidates=( @@ -946,6 +973,14 @@ _ps1_update() { __PS1_HOLIDAY="$(_ps1_holiday)" __PS1_STYLE="$(_ps1_style)" __PS1_GIT="${PS1_GIT:-0}" + if [[ "$__PS1_STYLE" == "demo" ]]; then + _ps1_demo_next + __PS1_STYLE="$__PS1_DEMO_STYLE" + __PS1_STYLE_PACK="$__PS1_DEMO_PACK" + if [[ "$__PS1_STYLE_PACK" == "holiday" && -n "$__PS1_DEMO_HOLIDAY" ]]; then + __PS1_HOLIDAY="$__PS1_DEMO_HOLIDAY" + fi + fi __PS1_SYM="$(_ps1_symbol)" __PS1_PATH="$(_ps1_path)" if _ps1_has_nf; then __PS1_USE_NF=1; else __PS1_USE_NF=0; fi diff --git a/libary.md b/libary.md index 39db2d5..5441934 100644 --- a/libary.md +++ b/libary.md @@ -108,6 +108,11 @@ PATH_FG=230 FRAME=24 ``` +Demo: +``` +Cycles all themes on each prompt (screenshots mode). +``` + ## Holidays Pack (style_pack=holiday) Design intent: themed color + emoji without sacrificing readability.