Merge branch 'dev'
This commit is contained in:
@@ -39,11 +39,12 @@
|
|||||||
"sources_from": "/etc/bash.bashrc",
|
"sources_from": "/etc/bash.bashrc",
|
||||||
"prompts": [
|
"prompts": [
|
||||||
"PS1 only / Banner only / Both",
|
"PS1 only / Banner only / Both",
|
||||||
"PS1 mode: Single season / Dynamic / Contest / Holidays (if PS1 selected)",
|
"PS1 mode: Single season / Dynamic / Contest / Holidays / Custom (if PS1 selected)",
|
||||||
"Season pick (if single season)",
|
"Season pick (if single season)",
|
||||||
"Contest layout selection (if contest/holidays)",
|
"Contest layout selection (if contest/holidays)",
|
||||||
"Style preset selection (if contest)",
|
"Style preset selection (if contest)",
|
||||||
"Holiday selection (if holidays)",
|
"Holiday selection (if holidays)",
|
||||||
|
"Custom style selection (if custom)",
|
||||||
"Enable git capsule for all themes (if PS1 selected)"
|
"Enable git capsule for all themes (if PS1 selected)"
|
||||||
],
|
],
|
||||||
"season_config_file": "/etc/ps1-season",
|
"season_config_file": "/etc/ps1-season",
|
||||||
@@ -61,11 +62,12 @@
|
|||||||
"~/.bash_profile"
|
"~/.bash_profile"
|
||||||
],
|
],
|
||||||
"prompts": [
|
"prompts": [
|
||||||
"PS1 mode: Single season / Dynamic / Contest / Holidays",
|
"PS1 mode: Single season / Dynamic / Contest / Holidays / Custom",
|
||||||
"Season pick (if single season)",
|
"Season pick (if single season)",
|
||||||
"Contest layout selection (if contest/holidays)",
|
"Contest layout selection (if contest/holidays)",
|
||||||
"Style preset selection (if contest)",
|
"Style preset selection (if contest)",
|
||||||
"Holiday selection (if holidays)",
|
"Holiday selection (if holidays)",
|
||||||
|
"Custom style selection (if custom)",
|
||||||
"Enable git capsule for all themes"
|
"Enable git capsule for all themes"
|
||||||
],
|
],
|
||||||
"season_config_file": "~/.config/ps1/season",
|
"season_config_file": "~/.config/ps1/season",
|
||||||
@@ -190,10 +192,59 @@
|
|||||||
"description": "Winter neon with tech icons, contest layout.",
|
"description": "Winter neon with tech icons, contest layout.",
|
||||||
"layout": "two-line, contest layout",
|
"layout": "two-line, contest layout",
|
||||||
"preview": "[date time user] @host - /path"
|
"preview": "[date time user] @host - /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "radar",
|
||||||
|
"name": "Radar",
|
||||||
|
"description": "Green scanline HUD with a clean, low-noise read.",
|
||||||
|
"layout": "two-line, minimal HUD",
|
||||||
|
"preview": "[user time] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "synthwave",
|
||||||
|
"name": "Synthwave",
|
||||||
|
"description": "Pink/cyan/orange glow blocks, aggressive contrast.",
|
||||||
|
"layout": "two-line, three blocks",
|
||||||
|
"preview": "[date time user] | @host | /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "noir",
|
||||||
|
"name": "Noir",
|
||||||
|
"description": "Near-black minimal with a sharp path accent.",
|
||||||
|
"layout": "two-line, minimal",
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "topo",
|
||||||
|
"name": "Topo",
|
||||||
|
"description": "Elevation-style path with multi-tone segments.",
|
||||||
|
"layout": "two-line, path emphasis",
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "glitch",
|
||||||
|
"name": "Glitch",
|
||||||
|
"description": "Jitter separators and neon contrast.",
|
||||||
|
"layout": "two-line, glitch separators",
|
||||||
|
"preview": "[date time user] ~ @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "arcticfire",
|
||||||
|
"name": "ArcticFire",
|
||||||
|
"description": "Icy blues on the left, ember orange on the right.",
|
||||||
|
"layout": "two-line, three blocks",
|
||||||
|
"preview": "[date time user] | @host | /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "acidlime",
|
||||||
|
"name": "AcidLime",
|
||||||
|
"description": "Black background with electric green signal.",
|
||||||
|
"layout": "two-line, minimal",
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"config": {
|
"config": {
|
||||||
"env": "PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex; 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; PS1_GIT=0|1",
|
"env": "PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex|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",
|
||||||
"config_file_keys": [
|
"config_file_keys": [
|
||||||
"PS1_STYLE",
|
"PS1_STYLE",
|
||||||
"PS1_STYLE_PACK",
|
"PS1_STYLE_PACK",
|
||||||
@@ -448,6 +499,7 @@
|
|||||||
"Seasonal palettes and contest pack are now documented directly in main.",
|
"Seasonal palettes and contest pack are now documented directly in main.",
|
||||||
"README uses images/bash-pallete.png.",
|
"README uses images/bash-pallete.png.",
|
||||||
"Git capsule prefers __git_ps1 and falls back to git symbolic-ref/short hash when git-prompt is unavailable or returns empty.",
|
"Git capsule prefers __git_ps1 and falls back to git symbolic-ref/short hash when git-prompt is unavailable or returns empty.",
|
||||||
"Hawolex git capsule enables when PS1_GIT resolves to a truthy value (1/yes/true/on)."
|
"Hawolex git capsule enables when PS1_GIT resolves to a truthy value (1/yes/true/on).",
|
||||||
|
"Custom pack adds bold styles (radar, synthwave, noir, topo, glitch, arcticfire, acidlime)."
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
22
README.md
22
README.md
@@ -84,12 +84,12 @@ After install:
|
|||||||
Linux/WSL:
|
Linux/WSL:
|
||||||
|
|
||||||
- PS1 only / Banner only / Both
|
- PS1 only / Banner only / Both
|
||||||
- PS1 modes: Single season, Dynamic season, Contest pack, Holidays pack
|
- PS1 modes: Single season, Dynamic season, Contest pack, Holidays pack, Custom pack
|
||||||
- Dynamic season auto-switches by time of year (Spring: Mar–May, Summer: Jun–Aug, Autumn: Sep–Nov 14, Winter: Nov 15–Feb)
|
- Dynamic season auto-switches by time of year (Spring: Mar–May, Summer: Jun–Aug, Autumn: Sep–Nov 14, Winter: Nov 15–Feb)
|
||||||
|
|
||||||
macOS:
|
macOS:
|
||||||
|
|
||||||
- PS1 modes: Single season, Dynamic season, Contest pack, Holidays pack
|
- PS1 modes: Single season, Dynamic season, Contest pack, Holidays pack, Custom pack
|
||||||
- Dynamic season auto-switches by time of year (same ranges as Linux)
|
- Dynamic season auto-switches by time of year (same ranges as Linux)
|
||||||
</details>
|
</details>
|
||||||
|
|
||||||
@@ -174,6 +174,24 @@ Note: This repo was built with AI assistance, and the contest pack itself is ful
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
<details>
|
||||||
|
<summary><strong>Custom Pack (bold styles)</strong></summary>
|
||||||
|
|
||||||
|
Seven extra styles, built to be loud and expressive:
|
||||||
|
|
||||||
|
- Radar: green scanline HUD
|
||||||
|
- Synthwave: pink/cyan/orange glow blocks
|
||||||
|
- Noir: near-black minimal + red path
|
||||||
|
- Topo: elevation-style path segments
|
||||||
|
- Glitch: jitter separators + neon
|
||||||
|
- ArcticFire: icy blues into ember orange
|
||||||
|
- AcidLime: black + electric green
|
||||||
|
|
||||||
|
Custom styles add a small context badge when relevant (`ssh`, `ctr`, `git`).
|
||||||
|
</details>
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
<details>
|
<details>
|
||||||
<summary><strong>Git Theme (details)</strong></summary>
|
<summary><strong>Git Theme (details)</strong></summary>
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"project": "Bashrc Dotfiles",
|
"project": "Bashrc Dotfiles",
|
||||||
"branch": "main",
|
"branch": "dev",
|
||||||
"purpose": "DEFCON contest render pack for PS1 styles",
|
"purpose": "DEFCON contest + custom render pack for PS1 styles",
|
||||||
"contest_pack": {
|
"contest_pack": {
|
||||||
"layout_options": [
|
"layout_options": [
|
||||||
"day-time-user",
|
"day-time-user",
|
||||||
@@ -105,6 +105,45 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"custom_pack": {
|
||||||
|
"styles": [
|
||||||
|
{
|
||||||
|
"id": "radar",
|
||||||
|
"tagline": "Green scanline HUD",
|
||||||
|
"preview": "[user time] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "synthwave",
|
||||||
|
"tagline": "Pink/cyan/orange glow blocks",
|
||||||
|
"preview": "[date time user] | @host | /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "noir",
|
||||||
|
"tagline": "Near-black minimal + red path",
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "topo",
|
||||||
|
"tagline": "Elevation path (multi-tone)",
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "glitch",
|
||||||
|
"tagline": "Jitter separators",
|
||||||
|
"preview": "[date time user] ~ @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "arcticfire",
|
||||||
|
"tagline": "Ice blue to ember orange",
|
||||||
|
"preview": "[date time user] | @host | /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "acidlime",
|
||||||
|
"tagline": "Black + electric green",
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
"styles": [
|
"styles": [
|
||||||
{
|
{
|
||||||
"id": "aurora",
|
"id": "aurora",
|
||||||
@@ -227,6 +266,128 @@
|
|||||||
"frame": 24
|
"frame": 24
|
||||||
},
|
},
|
||||||
"preview": "[date time user] @host - /path"
|
"preview": "[date time user] @host - /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "radar",
|
||||||
|
"name": "Radar",
|
||||||
|
"tagline": "Green scanline HUD",
|
||||||
|
"description": "Minimal HUD lines with green signal accents.",
|
||||||
|
"layout": {
|
||||||
|
"line1": "user time @host /path",
|
||||||
|
"line2": "status arrow + emoji"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"frame": 22,
|
||||||
|
"fg_main": 46,
|
||||||
|
"fg_dim": 28,
|
||||||
|
"path_fg": 120
|
||||||
|
},
|
||||||
|
"preview": "[user time] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "synthwave",
|
||||||
|
"name": "Synthwave",
|
||||||
|
"tagline": "Pink/cyan/orange glow",
|
||||||
|
"description": "Three-block powerline glow in neon tones.",
|
||||||
|
"layout": {
|
||||||
|
"line1": "date time user | @host | /path",
|
||||||
|
"line2": "status arrow + emoji"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"zone1_bg": 198,
|
||||||
|
"zone1_fg": 255,
|
||||||
|
"zone2_bg": 45,
|
||||||
|
"zone2_fg": 16,
|
||||||
|
"zone3_bg": 208,
|
||||||
|
"zone3_fg": 16,
|
||||||
|
"frame": 201
|
||||||
|
},
|
||||||
|
"preview": "[date time user] | @host | /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "noir",
|
||||||
|
"name": "Noir",
|
||||||
|
"tagline": "Near-black minimal",
|
||||||
|
"description": "Low-light mono with a red path accent.",
|
||||||
|
"layout": {
|
||||||
|
"line1": "date time user @host /path",
|
||||||
|
"line2": "status arrow + emoji"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"fg_main": 250,
|
||||||
|
"fg_dim": 242,
|
||||||
|
"path_fg": 160,
|
||||||
|
"frame": 236
|
||||||
|
},
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "topo",
|
||||||
|
"name": "Topo",
|
||||||
|
"tagline": "Elevation path",
|
||||||
|
"description": "Multi-tone path segments for depth.",
|
||||||
|
"layout": {
|
||||||
|
"line1": "date time user @host /path",
|
||||||
|
"line2": "status arrow + emoji"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"path_fg": [109, 110, 111, 110],
|
||||||
|
"frame": 24
|
||||||
|
},
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "glitch",
|
||||||
|
"name": "Glitch",
|
||||||
|
"tagline": "Jitter separators",
|
||||||
|
"description": "Shifting glyph separators in neon tones.",
|
||||||
|
"layout": {
|
||||||
|
"line1": "date time user ~ @host /path",
|
||||||
|
"line2": "status arrow + emoji"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"fg_main": 118,
|
||||||
|
"fg_dim": 60,
|
||||||
|
"frame": 129
|
||||||
|
},
|
||||||
|
"preview": "[date time user] ~ @host /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "arcticfire",
|
||||||
|
"name": "ArcticFire",
|
||||||
|
"tagline": "Ice to ember",
|
||||||
|
"description": "Cold blues into hot orange, three blocks.",
|
||||||
|
"layout": {
|
||||||
|
"line1": "date time user | @host | /path",
|
||||||
|
"line2": "status arrow + emoji"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"zone1_bg": 24,
|
||||||
|
"zone1_fg": 255,
|
||||||
|
"zone2_bg": 31,
|
||||||
|
"zone2_fg": 255,
|
||||||
|
"zone3_bg": 208,
|
||||||
|
"zone3_fg": 16,
|
||||||
|
"frame": 25
|
||||||
|
},
|
||||||
|
"preview": "[date time user] | @host | /path"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"id": "acidlime",
|
||||||
|
"name": "AcidLime",
|
||||||
|
"tagline": "Electric green",
|
||||||
|
"description": "Black background with green signal.",
|
||||||
|
"layout": {
|
||||||
|
"line1": "date time user @host /path",
|
||||||
|
"line2": "status arrow + emoji"
|
||||||
|
},
|
||||||
|
"colors": {
|
||||||
|
"fg_main": 46,
|
||||||
|
"fg_dim": 40,
|
||||||
|
"path_fg": 118,
|
||||||
|
"frame": 46
|
||||||
|
},
|
||||||
|
"preview": "[date time user] @host /path"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"seasonal_palettes": {
|
"seasonal_palettes": {
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ if [[ -t 0 ]]; then
|
|||||||
echo " 2) Dynamic season (auto, shifts with the year)"
|
echo " 2) Dynamic season (auto, shifts with the year)"
|
||||||
echo " 3) Contest pack (static)"
|
echo " 3) Contest pack (static)"
|
||||||
echo " 4) Holidays pack (static)"
|
echo " 4) Holidays pack (static)"
|
||||||
|
echo " 5) Custom pack (static)"
|
||||||
read -r -p "Choose [3]: " season_mode_choice
|
read -r -p "Choose [3]: " season_mode_choice
|
||||||
case "${season_mode_choice}" in
|
case "${season_mode_choice}" in
|
||||||
1)
|
1)
|
||||||
@@ -128,6 +129,10 @@ if [[ -t 0 ]]; then
|
|||||||
*) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;;
|
*) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
5)
|
||||||
|
season_mode="static"
|
||||||
|
style_pack="custom"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid choice, using dynamic."
|
echo "Invalid choice, using dynamic."
|
||||||
season_mode="dynamic"
|
season_mode="dynamic"
|
||||||
@@ -164,6 +169,34 @@ if [[ -t 0 ]]; then
|
|||||||
*) echo "Invalid choice, using aurora."; style_choice="aurora" ;;
|
*) echo "Invalid choice, using aurora."; style_choice="aurora" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
elif [[ "$style_pack" == "custom" ]]; then
|
||||||
|
echo
|
||||||
|
echo "Custom styles:"
|
||||||
|
echo " 1) Radar - Green scanline HUD, ultra clean"
|
||||||
|
echo " Preview: [user time] @host /path"
|
||||||
|
echo " 2) Synthwave - Pink/cyan/orange glow blocks"
|
||||||
|
echo " Preview: [date time user] | @host | /path"
|
||||||
|
echo " 3) Noir - Near-black minimal + red path"
|
||||||
|
echo " Preview: [date time user] @host /path"
|
||||||
|
echo " 4) Topo - Elevation path (multi-tone)"
|
||||||
|
echo " Preview: [date time user] @host /path"
|
||||||
|
echo " 5) Glitch - Jitter glyph separators"
|
||||||
|
echo " Preview: [date time user] ~ @host /path"
|
||||||
|
echo " 6) ArcticFire - Ice blue to ember orange"
|
||||||
|
echo " Preview: [date time user] | @host | /path"
|
||||||
|
echo " 7) AcidLime - Black + electric green"
|
||||||
|
echo " Preview: [date time user] @host /path"
|
||||||
|
read -r -p "Choose style [1]: " style_pick
|
||||||
|
case "${style_pick}" in
|
||||||
|
2) style_choice="synthwave" ;;
|
||||||
|
3) style_choice="noir" ;;
|
||||||
|
4) style_choice="topo" ;;
|
||||||
|
5) style_choice="glitch" ;;
|
||||||
|
6) style_choice="arcticfire" ;;
|
||||||
|
7) style_choice="acidlime" ;;
|
||||||
|
""|1) style_choice="radar" ;;
|
||||||
|
*) echo "Invalid choice, using radar."; style_choice="radar" ;;
|
||||||
|
esac
|
||||||
else
|
else
|
||||||
style_choice="aurora"
|
style_choice="aurora"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ if [[ -t 0 ]]; then
|
|||||||
echo " 2) Dynamic season (auto, shifts with the year)"
|
echo " 2) Dynamic season (auto, shifts with the year)"
|
||||||
echo " 3) Contest pack (static)"
|
echo " 3) Contest pack (static)"
|
||||||
echo " 4) Holidays pack (static)"
|
echo " 4) Holidays pack (static)"
|
||||||
|
echo " 5) Custom pack (static)"
|
||||||
read -r -p "Choose [3]: " season_mode_choice
|
read -r -p "Choose [3]: " season_mode_choice
|
||||||
case "${season_mode_choice}" in
|
case "${season_mode_choice}" in
|
||||||
1)
|
1)
|
||||||
@@ -104,6 +105,10 @@ if [[ -t 0 ]]; then
|
|||||||
*) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;;
|
*) echo "Invalid choice, using day-time-user."; contest_layout="day-time-user" ;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
5)
|
||||||
|
season_mode="static"
|
||||||
|
style_pack="custom"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid choice, using dynamic."
|
echo "Invalid choice, using dynamic."
|
||||||
season_mode="dynamic"
|
season_mode="dynamic"
|
||||||
@@ -140,6 +145,34 @@ if [[ -t 0 ]]; then
|
|||||||
*) echo "Invalid choice, using aurora."; style_choice="aurora" ;;
|
*) echo "Invalid choice, using aurora."; style_choice="aurora" ;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
elif [[ "$style_pack" == "custom" ]]; then
|
||||||
|
echo
|
||||||
|
echo "Custom styles:"
|
||||||
|
echo " 1) Radar - Green scanline HUD, ultra clean"
|
||||||
|
echo " Preview: [user time] @host /path"
|
||||||
|
echo " 2) Synthwave - Pink/cyan/orange glow blocks"
|
||||||
|
echo " Preview: [date time user] | @host | /path"
|
||||||
|
echo " 3) Noir - Near-black minimal + red path"
|
||||||
|
echo " Preview: [date time user] @host /path"
|
||||||
|
echo " 4) Topo - Elevation path (multi-tone)"
|
||||||
|
echo " Preview: [date time user] @host /path"
|
||||||
|
echo " 5) Glitch - Jitter glyph separators"
|
||||||
|
echo " Preview: [date time user] ~ @host /path"
|
||||||
|
echo " 6) ArcticFire - Ice blue to ember orange"
|
||||||
|
echo " Preview: [date time user] | @host | /path"
|
||||||
|
echo " 7) AcidLime - Black + electric green"
|
||||||
|
echo " Preview: [date time user] @host /path"
|
||||||
|
read -r -p "Choose style [1]: " style_pick
|
||||||
|
case "${style_pick}" in
|
||||||
|
2) style_choice="synthwave" ;;
|
||||||
|
3) style_choice="noir" ;;
|
||||||
|
4) style_choice="topo" ;;
|
||||||
|
5) style_choice="glitch" ;;
|
||||||
|
6) style_choice="arcticfire" ;;
|
||||||
|
7) style_choice="acidlime" ;;
|
||||||
|
""|1) style_choice="radar" ;;
|
||||||
|
*) echo "Invalid choice, using radar."; style_choice="radar" ;;
|
||||||
|
esac
|
||||||
else
|
else
|
||||||
style_choice="aurora"
|
style_choice="aurora"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -89,9 +89,9 @@ _ps1_season() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Style selection (aurora/neon/forge/circuit/mono/git/hawolex)
|
# Style selection (aurora/neon/forge/circuit/mono/git/hawolex + custom pack)
|
||||||
# PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex
|
# PS1_STYLE=aurora|neon|forge|circuit|mono|git|hawolex|radar|synthwave|noir|topo|glitch|arcticfire|acidlime
|
||||||
# PS1_STYLE_PACK=standard|contest|holiday
|
# PS1_STYLE_PACK=standard|contest|holiday|custom
|
||||||
# PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time
|
# PS1_CONTEST_LAYOUT=day-time-user|user-time|time-user|day-time
|
||||||
# PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear
|
# PS1_HOLIDAY=christmas|easter|halloween|valentine|thanksgiving|newyear
|
||||||
# PS1_GIT=0|1
|
# PS1_GIT=0|1
|
||||||
@@ -167,6 +167,50 @@ _ps1_git_line_tail() {
|
|||||||
printf " "
|
printf " "
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ps1_context_badge() {
|
||||||
|
local parts=()
|
||||||
|
if [[ -n "${SSH_CONNECTION:-}" ]]; then
|
||||||
|
parts+=("ssh")
|
||||||
|
fi
|
||||||
|
if [[ -f /.dockerenv || -f /run/.containerenv ]]; then
|
||||||
|
parts+=("ctr")
|
||||||
|
fi
|
||||||
|
if command -v git >/dev/null 2>&1 && git rev-parse --is-inside-work-tree >/dev/null 2>&1; then
|
||||||
|
parts+=("git")
|
||||||
|
fi
|
||||||
|
if ((${#parts[@]} == 0)); then
|
||||||
|
printf ""
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
printf "[%s] " "$(IFS=:; echo "${parts[*]}")"
|
||||||
|
}
|
||||||
|
|
||||||
|
_ps1_glitch_glyph() {
|
||||||
|
local glyphs=( "≣" "∿" "⌁" "⋯" "⋆" "≡" )
|
||||||
|
local idx=$((10#$(date +%S) % ${#glyphs[@]}))
|
||||||
|
printf "%s" "${glyphs[$idx]}"
|
||||||
|
}
|
||||||
|
|
||||||
|
_ps1_path_topo() {
|
||||||
|
local p="${__PS1_PATH}"
|
||||||
|
local colors=(109 110 111 110)
|
||||||
|
local out=""
|
||||||
|
local idx=0
|
||||||
|
local IFS='/'
|
||||||
|
read -ra parts <<< "$p"
|
||||||
|
for part in "${parts[@]}"; do
|
||||||
|
if [[ -z "$part" ]]; then
|
||||||
|
out+="/"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
local c="${colors[$((idx % ${#colors[@]}))]}"
|
||||||
|
out+="\[\e[38;5;${c}m\]${part}\[\e[0m\]/"
|
||||||
|
((idx++))
|
||||||
|
done
|
||||||
|
out="${out%/}"
|
||||||
|
printf "%s" "$out"
|
||||||
|
}
|
||||||
|
|
||||||
# ---- Load Git prompt helper (best effort) ----
|
# ---- Load Git prompt helper (best effort) ----
|
||||||
__try_source_git_prompt() {
|
__try_source_git_prompt() {
|
||||||
local candidates=(
|
local candidates=(
|
||||||
@@ -704,6 +748,103 @@ ${H_LEFT_FG}${H_LEFT}${RST}${H_Z1_BG}${H_Z1_FG} ${L1} ${RST}${H_Z1_BG}${H_Z2_BG}
|
|||||||
${H_Z2_BG}${H_Z2_FG} ${HOST_PART}${PATH_SEP}${H_PATH_FG}${PATH_PART}${END_PAD}${RST}${H_RIGHT_FG}${H_RIGHT}${RST}\
|
${H_Z2_BG}${H_Z2_FG} ${HOST_PART}${PATH_SEP}${H_PATH_FG}${PATH_PART}${END_PAD}${RST}${H_RIGHT_FG}${H_RIGHT}${RST}\
|
||||||
\n${H_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
\n${H_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
;;
|
;;
|
||||||
|
radar)
|
||||||
|
local R_FRAME="\[\e[38;5;22m\]"
|
||||||
|
local R_MAIN="\[\e[38;5;46m\]"
|
||||||
|
local R_DIM="\[\e[38;5;28m\]"
|
||||||
|
local R_PATH="\[\e[38;5;120m\]"
|
||||||
|
PS1="\
|
||||||
|
${R_FRAME}╭─${RST}${R_MAIN}⟦\\u \\A⟧ ${R_DIM}@\\h ${R_PATH}${__PS1_PATH}${RST}\
|
||||||
|
\n${R_FRAME}╰─${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
|
;;
|
||||||
|
synthwave)
|
||||||
|
local SW_FRAME="\[\e[38;5;201m\]"
|
||||||
|
local SW1_BG="\[\e[48;5;198m\]"
|
||||||
|
local SW1_FG="\[\e[38;5;255m\]"
|
||||||
|
local SW2_BG="\[\e[48;5;45m\]"
|
||||||
|
local SW2_FG="\[\e[38;5;16m\]"
|
||||||
|
local SW3_BG="\[\e[48;5;208m\]"
|
||||||
|
local SW3_FG="\[\e[38;5;16m\]"
|
||||||
|
local SW_LEFT="${left}"
|
||||||
|
local SW_RIGHT="${right}"
|
||||||
|
local SW_SEP="${sep}"
|
||||||
|
local SW_LEFT_FG=""
|
||||||
|
local SW_RIGHT_FG=""
|
||||||
|
if [[ "$__PS1_USE_NF" -eq 1 ]]; then
|
||||||
|
SW_LEFT=""
|
||||||
|
SW_RIGHT=""
|
||||||
|
SW_SEP=""
|
||||||
|
SW_LEFT_FG="\[\e[38;5;198m\]"
|
||||||
|
SW_RIGHT_FG="\[\e[38;5;208m\]"
|
||||||
|
fi
|
||||||
|
local SW_SEP12="\[\e[38;5;45m\]\[\e[48;5;198m\]${SW_SEP}${RST}"
|
||||||
|
local SW_SEP23="\[\e[38;5;208m\]\[\e[48;5;45m\]${SW_SEP}${RST}"
|
||||||
|
PS1="\
|
||||||
|
${SW_FRAME}╭─${RST}\
|
||||||
|
${SW_LEFT_FG}${SW_LEFT}${RST}${SW1_BG}${SW1_FG} ${L1} ${RST}${SW_SEP12}${SW2_BG}${SW2_FG} ${L_HOST} ${RST}${SW_SEP23}${SW3_BG}${SW3_FG} ${__PS1_PATH}${END_PAD}${RST}${SW_RIGHT_FG}${SW_RIGHT}${RST}\
|
||||||
|
\n${SW_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
|
;;
|
||||||
|
noir)
|
||||||
|
local N_FRAME="\[\e[38;5;236m\]"
|
||||||
|
local N_MAIN="\[\e[38;5;250m\]"
|
||||||
|
local N_DIM="\[\e[38;5;242m\]"
|
||||||
|
local N_PATH="\[\e[38;5;160m\]"
|
||||||
|
PS1="\
|
||||||
|
${N_FRAME}╭─${RST}${N_MAIN}${L1}${RST} ${N_DIM}${L_HOST}${RST} ${N_PATH}${__PS1_PATH}${RST}\
|
||||||
|
\n${N_FRAME}╰─${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
|
;;
|
||||||
|
topo)
|
||||||
|
local T_FRAME="\[\e[38;5;24m\]"
|
||||||
|
local T_MAIN="\[\e[38;5;248m\]"
|
||||||
|
PS1="\
|
||||||
|
${T_FRAME}╭─${RST}${T_MAIN}${L1}${RST} ${T_FRAME}${L_HOST}${RST} $(_ps1_path_topo)${END_PAD}${RST}\
|
||||||
|
\n${T_FRAME}╰─${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
|
;;
|
||||||
|
glitch)
|
||||||
|
local G_FRAME="\[\e[38;5;129m\]"
|
||||||
|
local G_MAIN="\[\e[38;5;118m\]"
|
||||||
|
local G_DIM="\[\e[38;5;60m\]"
|
||||||
|
local G_SEP="$(_ps1_glitch_glyph)"
|
||||||
|
PS1="\
|
||||||
|
${G_FRAME}╭─${RST}${G_MAIN}${L1}${RST} ${G_DIM}${G_SEP}${RST} ${G_MAIN}${L_HOST} ${RST}${G_DIM}${G_SEP}${RST} ${G_MAIN}${__PS1_PATH}${RST}\
|
||||||
|
\n${G_FRAME}╰─${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
|
;;
|
||||||
|
arcticfire)
|
||||||
|
local AF_FRAME="\[\e[38;5;25m\]"
|
||||||
|
local AF1_BG="\[\e[48;5;24m\]"
|
||||||
|
local AF1_FG="\[\e[38;5;255m\]"
|
||||||
|
local AF2_BG="\[\e[48;5;31m\]"
|
||||||
|
local AF2_FG="\[\e[38;5;255m\]"
|
||||||
|
local AF3_BG="\[\e[48;5;208m\]"
|
||||||
|
local AF3_FG="\[\e[38;5;16m\]"
|
||||||
|
local AF_LEFT="${left}"
|
||||||
|
local AF_RIGHT="${right}"
|
||||||
|
local AF_SEP="${sep}"
|
||||||
|
local AF_LEFT_FG=""
|
||||||
|
local AF_RIGHT_FG=""
|
||||||
|
if [[ "$__PS1_USE_NF" -eq 1 ]]; then
|
||||||
|
AF_LEFT=""
|
||||||
|
AF_RIGHT=""
|
||||||
|
AF_SEP=""
|
||||||
|
AF_LEFT_FG="\[\e[38;5;24m\]"
|
||||||
|
AF_RIGHT_FG="\[\e[38;5;208m\]"
|
||||||
|
fi
|
||||||
|
local AF_SEP12="\[\e[38;5;31m\]\[\e[48;5;24m\]${AF_SEP}${RST}"
|
||||||
|
local AF_SEP23="\[\e[38;5;208m\]\[\e[48;5;31m\]${AF_SEP}${RST}"
|
||||||
|
PS1="\
|
||||||
|
${AF_FRAME}╭─${RST}\
|
||||||
|
${AF_LEFT_FG}${AF_LEFT}${RST}${AF1_BG}${AF1_FG} ${L1} ${RST}${AF_SEP12}${AF2_BG}${AF2_FG} ${L_HOST} ${RST}${AF_SEP23}${AF3_BG}${AF3_FG} ${__PS1_PATH}${END_PAD}${RST}${AF_RIGHT_FG}${AF_RIGHT}${RST}\
|
||||||
|
\n${AF_FRAME}╰── ${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
|
;;
|
||||||
|
acidlime)
|
||||||
|
local AL_FRAME="\[\e[38;5;46m\]"
|
||||||
|
local AL_MAIN="\[\e[38;5;46m\]"
|
||||||
|
local AL_DIM="\[\e[38;5;40m\]"
|
||||||
|
local AL_PATH="\[\e[38;5;118m\]"
|
||||||
|
PS1="\
|
||||||
|
${AL_FRAME}╭─${RST}${AL_MAIN}${L1}${RST} ${AL_DIM}${L_HOST}${RST} ${AL_PATH}${__PS1_PATH}${RST}\
|
||||||
|
\n${AL_FRAME}╰─${RST}${prompt_sym} ${__PS1_SYM}${git_tail}"
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
# aurora (default)
|
# aurora (default)
|
||||||
local A_LEFT="${left}"
|
local A_LEFT="${left}"
|
||||||
|
|||||||
Reference in New Issue
Block a user