Compare commits
10 Commits
16a7d8dad9
...
dd1ba72cd1
| Author | SHA1 | Date | |
|---|---|---|---|
| dd1ba72cd1 | |||
| 0e87cee872 | |||
| 18eda7ae6b | |||
| 4a7cdcc11f | |||
| 2443820037 | |||
| f5386bc047 | |||
| ec18a4d68f | |||
| d1ee693044 | |||
| 3fb8b9697a | |||
| 12fc686de1 |
537
.context.json
537
.context.json
@@ -1,537 +0,0 @@
|
||||
{
|
||||
"project": {
|
||||
"name": "Bashrc Dotfiles",
|
||||
"purpose": "Global and per-user bash prompt + banner with seasonal palettes and time/season emoji accents.",
|
||||
"repo_root": "/home/steffen/Bashrc",
|
||||
"default_branch": "main",
|
||||
"release_state": "main is production-ready"
|
||||
},
|
||||
"branches": {
|
||||
"main": {
|
||||
"notes": [
|
||||
"Shared PS1 module in dotfiles/ps1/ps1.sh is source of truth for both Linux and macOS installers.",
|
||||
"README documents seasonal ranges and style packs.",
|
||||
"README example image uses images/bash-pallete.png."
|
||||
]
|
||||
}
|
||||
},
|
||||
"files": {
|
||||
"ps1_shared": "dotfiles/ps1/ps1.sh",
|
||||
"linux_installer": "dotfiles/install/install-linux-global.sh",
|
||||
"macos_installer": "dotfiles/install/install-macos-user.sh",
|
||||
"global_installer_wrapper": "dotfiles/install/install-global-ps1.sh",
|
||||
"readme": "README.md",
|
||||
"library": "libary.md",
|
||||
"palette_image": "images/bash-pallete.png",
|
||||
"theme_images_dir": "images/themes",
|
||||
"theme_images": {
|
||||
"season_winter": "images/themes/season-winter.png",
|
||||
"season_spring": "images/themes/season-spring.png",
|
||||
"season_summer": "images/themes/season-summer.png",
|
||||
"season_autumn": "images/themes/season-autumn.png",
|
||||
"aurora": "images/themes/aurora.png",
|
||||
"neon": "images/themes/neon.png",
|
||||
"forge": "images/themes/forge.png",
|
||||
"circuit": "images/themes/circuit.png",
|
||||
"mono": "images/themes/mono.png",
|
||||
"git": "images/themes/git.png",
|
||||
"hawolex": "images/themes/hawolex.png",
|
||||
"hawolexv2": "images/themes/hawolexv2.png",
|
||||
"christmas": "images/themes/christmas.png",
|
||||
"easter": "images/themes/easter.png",
|
||||
"halloween": "images/themes/halloween.png",
|
||||
"valentine": "images/themes/valentine.png",
|
||||
"thanksgiving": "images/themes/thanksgiving.png",
|
||||
"newyear": "images/themes/newyear.png",
|
||||
"radar": "images/themes/radar.png",
|
||||
"synthwave": "images/themes/synthwave.png",
|
||||
"noir": "images/themes/noir.png",
|
||||
"topo": "images/themes/topo.png",
|
||||
"glitch": "images/themes/glitch.png",
|
||||
"arcticfire": "images/themes/arcticfire.png",
|
||||
"acidlime": "images/themes/acidlime.png"
|
||||
}
|
||||
},
|
||||
"install_behavior": {
|
||||
"linux": {
|
||||
"script": "dotfiles/install/install-linux-global.sh",
|
||||
"scope": "global (all users)",
|
||||
"installs": [
|
||||
"/etc/profile.d/ps1.sh",
|
||||
"/etc/profile.d/banner.sh"
|
||||
],
|
||||
"sources_from": "/etc/bash.bashrc",
|
||||
"prompts": [
|
||||
"PS1 only / Banner only / Both",
|
||||
"PS1 mode: Single season / Dynamic / Contest / Holidays / Custom (if PS1 selected)",
|
||||
"Season pick (if single season)",
|
||||
"Layout order selection (seasonal/contest/holidays)",
|
||||
"Style preset selection (if contest)",
|
||||
"Holiday selection (if holidays)",
|
||||
"Custom style selection (if custom)",
|
||||
"Enable git capsule for all themes (if PS1 selected)"
|
||||
],
|
||||
"season_config_file": "/etc/ps1-season",
|
||||
"style_config_file": "/etc/ps1-style",
|
||||
"banner_punchline_file": "/etc/ps1-punchline"
|
||||
},
|
||||
"macos": {
|
||||
"script": "dotfiles/install/install-macos-user.sh",
|
||||
"scope": "per-user",
|
||||
"installs": [
|
||||
"~/.config/ps1/ps1.sh"
|
||||
],
|
||||
"sources_from": [
|
||||
"~/.bashrc",
|
||||
"~/.bash_profile"
|
||||
],
|
||||
"prompts": [
|
||||
"PS1 mode: Single season / Dynamic / Contest / Holidays / Custom",
|
||||
"Season pick (if single season)",
|
||||
"Layout order selection (seasonal/contest/holidays)",
|
||||
"Style preset selection (if contest)",
|
||||
"Holiday selection (if holidays)",
|
||||
"Custom style selection (if custom)",
|
||||
"Enable git capsule for all themes"
|
||||
],
|
||||
"season_config_file": "~/.config/ps1/season",
|
||||
"style_config_file": "~/.config/ps1/style"
|
||||
},
|
||||
"global_installer_wrapper": {
|
||||
"script": "dotfiles/install/install-global-ps1.sh",
|
||||
"behavior": "Copies shared PS1 module to /etc/profile.d/ps1.sh and updates /etc/bash.bashrc."
|
||||
}
|
||||
},
|
||||
"season_rules": {
|
||||
"timezone": "Europe/Oslo",
|
||||
"dynamic_ranges": {
|
||||
"spring": "March-May",
|
||||
"summer": "June-August",
|
||||
"autumn": "September-mid November (before Nov 15)",
|
||||
"winter": "mid November-February"
|
||||
},
|
||||
"config": {
|
||||
"mode_env": "PS1_SEASON_MODE=dynamic|static",
|
||||
"season_env": "PS1_SEASON=winter|spring|summer|autumn",
|
||||
"config_file_keys": [
|
||||
"PS1_SEASON_MODE",
|
||||
"PS1_SEASON"
|
||||
]
|
||||
}
|
||||
},
|
||||
"palettes": {
|
||||
"winter": {
|
||||
"Z1_BG": 59,
|
||||
"Z2_BG": 61,
|
||||
"Z3_BG": 63,
|
||||
"Z4_BG": 38,
|
||||
"Z5_BG": 37,
|
||||
"Z1_FG": 255,
|
||||
"Z2_FG": 255,
|
||||
"PATH_FG": 152,
|
||||
"FRAME": 60
|
||||
},
|
||||
"spring": {
|
||||
"Z1_BG": 68,
|
||||
"Z2_BG": 70,
|
||||
"Z3_BG": 72,
|
||||
"Z4_BG": 121,
|
||||
"Z5_BG": 120,
|
||||
"Z1_FG": 255,
|
||||
"Z2_FG": 22,
|
||||
"PATH_FG": 28,
|
||||
"FRAME": 65
|
||||
},
|
||||
"summer": {
|
||||
"Z1_BG": 141,
|
||||
"Z2_BG": 142,
|
||||
"Z3_BG": 143,
|
||||
"Z4_BG": 214,
|
||||
"Z5_BG": 208,
|
||||
"Z1_FG": 255,
|
||||
"Z2_FG": 0,
|
||||
"PATH_FG": 0,
|
||||
"FRAME": 130
|
||||
},
|
||||
"autumn": {
|
||||
"Z1_BG": 93,
|
||||
"Z2_BG": 95,
|
||||
"Z3_BG": 97,
|
||||
"Z4_BG": 166,
|
||||
"Z5_BG": 136,
|
||||
"Z1_FG": 255,
|
||||
"Z2_FG": 255,
|
||||
"PATH_FG": 223,
|
||||
"FRAME": 95
|
||||
}
|
||||
},
|
||||
"styles": {
|
||||
"default": "aurora",
|
||||
"available": [
|
||||
{
|
||||
"id": "aurora",
|
||||
"name": "Aurora",
|
||||
"description": "Powerline blocks with seasonal palette, two-line calm layout.",
|
||||
"layout": "two-line, segmented blocks",
|
||||
"preview": "[date time user] > [@host /path]"
|
||||
},
|
||||
{
|
||||
"id": "neon",
|
||||
"name": "Neon",
|
||||
"description": "Magenta/cyan cyber blocks, high contrast, two-line.",
|
||||
"layout": "two-line, neon blocks",
|
||||
"preview": "[user time] > [@host /path]"
|
||||
},
|
||||
{
|
||||
"id": "forge",
|
||||
"name": "Forge",
|
||||
"description": "Warm copper blocks, heavy frame, assertive.",
|
||||
"layout": "two-line, bold blocks",
|
||||
"preview": "[date time user] > [@host /path]"
|
||||
},
|
||||
{
|
||||
"id": "circuit",
|
||||
"name": "Circuit",
|
||||
"description": "Green scanline rail, minimal chrome, compact.",
|
||||
"layout": "two-line, rail style",
|
||||
"preview": "[user time] - @host /path"
|
||||
},
|
||||
{
|
||||
"id": "mono",
|
||||
"name": "Mono",
|
||||
"description": "Clean monochrome, fast read, low noise.",
|
||||
"layout": "two-line, minimal",
|
||||
"preview": "[date time user] @host /path"
|
||||
},
|
||||
{
|
||||
"id": "git",
|
||||
"name": "Git",
|
||||
"description": "Minimal blocks with git capsule when in repo.",
|
||||
"layout": "two-line, git capsule on line 2",
|
||||
"preview": "[date time user] @host - /path (git)"
|
||||
},
|
||||
{
|
||||
"id": "hawolex",
|
||||
"name": "Hawolex",
|
||||
"description": "Winter neon with tech icons, contest layout.",
|
||||
"layout": "two-line, contest layout",
|
||||
"preview": "[date time user] @host - /path"
|
||||
},
|
||||
{
|
||||
"id": "hawolexv2",
|
||||
"name": "HawolexV2",
|
||||
"description": "Winter neon with multi-segment gradient.",
|
||||
"layout": "two-line, segmented gradient",
|
||||
"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": {
|
||||
"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",
|
||||
"config_file_keys": [
|
||||
"PS1_STYLE",
|
||||
"PS1_STYLE_PACK",
|
||||
"PS1_CONTEST_LAYOUT",
|
||||
"PS1_HOLIDAY",
|
||||
"PS1_GIT"
|
||||
]
|
||||
}
|
||||
},
|
||||
"emoji_rules": {
|
||||
"fixed_times": {
|
||||
"lunch": "11:00-11:29 => 🥪",
|
||||
"dinner": "16:00-16:59 => 🍲"
|
||||
},
|
||||
"rotation": "Daily rotation by day-of-year with season offsets.",
|
||||
"seasonal_accents": {
|
||||
"spring": {
|
||||
"sunrise": [
|
||||
"🌷",
|
||||
"🌱",
|
||||
"🐣",
|
||||
"🌤"
|
||||
],
|
||||
"coffee": "☕",
|
||||
"work": [
|
||||
"🌿",
|
||||
"🪴",
|
||||
"🐝",
|
||||
"🌼"
|
||||
],
|
||||
"evening": "🌤",
|
||||
"night": "🌙"
|
||||
},
|
||||
"summer": {
|
||||
"sunrise": [
|
||||
"🌞",
|
||||
"🏖️",
|
||||
"🌅",
|
||||
"🌤"
|
||||
],
|
||||
"coffee": "🧃",
|
||||
"work": [
|
||||
"🏄",
|
||||
"🏖️",
|
||||
"🚤",
|
||||
"🌴"
|
||||
],
|
||||
"evening": "🌇",
|
||||
"night": "🌙"
|
||||
},
|
||||
"autumn": {
|
||||
"sunrise": [
|
||||
"🍁",
|
||||
"🍂",
|
||||
"🌫️",
|
||||
"🌦️"
|
||||
],
|
||||
"coffee": "☕",
|
||||
"work": [
|
||||
"🍂",
|
||||
"🍄",
|
||||
"🎃",
|
||||
"🪵"
|
||||
],
|
||||
"evening": "🌆",
|
||||
"night": "🌙"
|
||||
},
|
||||
"winter": {
|
||||
"sunrise": [
|
||||
"🏔️",
|
||||
"🌨️",
|
||||
"❄️",
|
||||
"🌌"
|
||||
],
|
||||
"coffee": "☕",
|
||||
"work": [
|
||||
"🎿",
|
||||
"⛷️",
|
||||
"🏂",
|
||||
"🧊"
|
||||
],
|
||||
"evening": "🌆",
|
||||
"night": "🌙"
|
||||
}
|
||||
},
|
||||
"contest_accents": {
|
||||
"sunrise": [
|
||||
"⚡️",
|
||||
"🛰️",
|
||||
"🧬",
|
||||
"🧠"
|
||||
],
|
||||
"work": [
|
||||
"🛠️",
|
||||
"💾",
|
||||
"🧪",
|
||||
"🧩"
|
||||
],
|
||||
"coffee": "☕",
|
||||
"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": "🌙"
|
||||
}
|
||||
},
|
||||
"style_accents": {
|
||||
"hawolex": {
|
||||
"sunrise": [
|
||||
"💻",
|
||||
"🚗",
|
||||
"🔊",
|
||||
"🎮"
|
||||
],
|
||||
"work": [
|
||||
"🎧",
|
||||
"🕹️",
|
||||
"📟",
|
||||
"🧩"
|
||||
],
|
||||
"coffee": "☕",
|
||||
"evening": "🌆",
|
||||
"night": "🌙"
|
||||
}
|
||||
},
|
||||
"time_slots": {
|
||||
"sunrise": "05:00-08:59",
|
||||
"coffee": "09:00-10:59",
|
||||
"work": "11:30-15:59",
|
||||
"evening": "17:00-22:59",
|
||||
"night": "23:00-04:59"
|
||||
}
|
||||
},
|
||||
"prompt_structure": {
|
||||
"zone1": "date time user",
|
||||
"zone2": "host path",
|
||||
"seasonal_segments": "date | time | user | host+path (subtle seasonal gradient)",
|
||||
"line2": "status arrow + emoji",
|
||||
"emoji_padding": "Two spaces after the emoji before the cursor",
|
||||
"path_shortening": "Keeps /home/user or /Users/user visible and shortens middle if deep.",
|
||||
"nerd_font_caps": "Always enabled unless PS1_FORCE_ASCII=1"
|
||||
},
|
||||
"overrides": {
|
||||
"force_nerd_font": "PS1_FORCE_NF=1",
|
||||
"force_ascii": "PS1_FORCE_ASCII=1",
|
||||
"disable_prompt_env": "DISABLE_GLOBAL_PS1=1",
|
||||
"disable_prompt_file": "~/.config/ps1/disable"
|
||||
},
|
||||
"notes": [
|
||||
"On Linux, installer affects all users by writing to /etc/profile.d and sourcing from /etc/bash.bashrc.",
|
||||
"On macOS, installer is per-user and sources from .bashrc/.bash_profile.",
|
||||
"Seasonal palettes and contest pack are now documented directly in main.",
|
||||
"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.",
|
||||
"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).",
|
||||
"Library includes emoji usage blocks per theme (sets, fixed times, time slots, rotation)."
|
||||
]
|
||||
}
|
||||
18
.editorconfig
Normal file
18
.editorconfig
Normal file
@@ -0,0 +1,18 @@
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
end_of_line = lf
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
trim_trailing_whitespace = false
|
||||
|
||||
[*.sh]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
||||
[*.yml]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
21
.github/workflows/shellcheck.yml
vendored
Normal file
21
.github/workflows/shellcheck.yml
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
name: ShellCheck
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- "dotfiles/**/*.sh"
|
||||
- ".github/workflows/shellcheck.yml"
|
||||
pull_request:
|
||||
paths:
|
||||
- "dotfiles/**/*.sh"
|
||||
- ".github/workflows/shellcheck.yml"
|
||||
|
||||
jobs:
|
||||
shellcheck:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install ShellCheck
|
||||
run: sudo apt-get update && sudo apt-get install -y shellcheck
|
||||
- name: Run ShellCheck
|
||||
run: shellcheck dotfiles/**/*.sh
|
||||
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
.sshinfo.txt
|
||||
.context.json
|
||||
contest-styles.json
|
||||
22
CONTRIBUTING.md
Normal file
22
CONTRIBUTING.md
Normal file
@@ -0,0 +1,22 @@
|
||||
# Contributing
|
||||
|
||||
Thanks for helping improve ps1-craft. Keep changes small, readable, and fast.
|
||||
|
||||
## Style rules
|
||||
|
||||
- Keep the prompt hot path fast (no external commands unless feature-gated).
|
||||
- Use `printf` over `echo` for formatting.
|
||||
- Quote variables and paths; avoid word-splitting.
|
||||
- Maintain bash 3.2 compatibility for macOS.
|
||||
|
||||
## Add a new theme or palette
|
||||
|
||||
1) Update `dotfiles/ps1/ps1.sh` with the new colors/icons.
|
||||
2) Add a screenshot under `images/themes/`.
|
||||
3) Document it in `library.md` and `README.md`.
|
||||
|
||||
## Testing
|
||||
|
||||
- Run the installer script you changed.
|
||||
- Open a new shell and verify the prompt renders.
|
||||
- Run ShellCheck on `dotfiles/**/*.sh`.
|
||||
21
LICENSE
Normal file
21
LICENSE
Normal file
@@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2026 Steffen Skui
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
97
README.md
97
README.md
@@ -1,19 +1,31 @@
|
||||
# Bashrc Dotfiles — Global & Portable Bash Prompt
|
||||
# ps1-craft — Global & Portable Bash Prompt
|
||||
|
||||
Elegant, portable, and easy-to-install Bash prompt with seasonal palettes, time-aware emoji, and clean powerline structure.
|
||||
|
||||
## ⚡ 10-Second Demo
|
||||
|
||||
```text
|
||||
[Mon 14:32 steffen] ▶
|
||||
@host ~/ps1-craft ⟦main⟧ ✨
|
||||
```
|
||||
|
||||
Preview (Aurora seasonal):
|
||||
|
||||

|
||||
|
||||
---
|
||||
|
||||
## ⚡ Quick Look
|
||||
|
||||
- Theme gallery + full specs: [Theme Library](libary.md)
|
||||
- Theme gallery + full specs: [Theme Library](library.md)
|
||||
- Install scope + rollback: [UNINSTALL.md](UNINSTALL.md)
|
||||
- Packs: Seasonal (auto), Contest, Holidays, Custom, Git
|
||||
- Layout order option: day-time-user, user-time, time-user, day-time
|
||||
- Optional git capsule across themes
|
||||
|
||||
## ✅ Requirements (Nerd Fonts)
|
||||
|
||||
This prompt relies on Nerd Font glyphs for the rounded separators.
|
||||
This prompt relies on Nerd Fonts glyphs for the rounded separators.
|
||||
|
||||
```bash
|
||||
bash dotfiles/install/install-nerdfont.sh
|
||||
@@ -21,13 +33,29 @@ bash dotfiles/install/install-nerdfont.sh
|
||||
|
||||
After install:
|
||||
|
||||
- Set your terminal font to JetBrainsMono Nerd Font (or any Nerd Font)
|
||||
- Set your terminal font to JetBrainsMono Nerd Font (or any Nerd Fonts family)
|
||||
- Manual download: https://www.nerdfonts.com/font-downloads
|
||||
|
||||
If you use a non‑Nerd font, the prompt falls back to ASCII/Unicode.
|
||||
|
||||
---
|
||||
|
||||
## ⚠️ Safety / Scope (global install)
|
||||
|
||||
Linux/WSL installs are global and modify system files:
|
||||
|
||||
- Writes `/etc/profile.d/ps1.sh` and `/etc/profile.d/banner.sh`
|
||||
- Writes `/etc/ps1-season`, `/etc/ps1-style`, and `/etc/ps1-punchline`
|
||||
- Adds a managed source block in `/etc/bash.bashrc`
|
||||
|
||||
Rollback and uninstall steps live in [UNINSTALL.md](UNINSTALL.md). You can also disable per user:
|
||||
|
||||
- `export DISABLE_GLOBAL_PS1=1`
|
||||
- `export DISABLE_GLOBAL_BANNER=1`
|
||||
- `touch ~/.config/ps1/disable` (PS1) or `touch ~/.config/ps1/disable-banner` (banner)
|
||||
|
||||
---
|
||||
|
||||
## 🚀 Install
|
||||
|
||||
### 🐧 Linux / WSL (global, all users)
|
||||
@@ -35,13 +63,13 @@ If you use a non‑Nerd font, the prompt falls back to ASCII/Unicode.
|
||||
1) Clone the repo:
|
||||
|
||||
```bash
|
||||
git clone <repo-url>
|
||||
git clone git@github.com:Hawolex/ps1-craft.git
|
||||
```
|
||||
|
||||
2) Enter the folder:
|
||||
|
||||
```bash
|
||||
cd Bashrc
|
||||
cd ps1-craft
|
||||
```
|
||||
|
||||
3) Run the global installer (auto-installs deps + prompts for punchline):
|
||||
@@ -57,13 +85,13 @@ sudo bash dotfiles/install/install-linux-global.sh
|
||||
1) Clone the repo:
|
||||
|
||||
```bash
|
||||
git clone <repo-url>
|
||||
git clone git@github.com:Hawolex/ps1-craft.git
|
||||
```
|
||||
|
||||
2) Enter the folder:
|
||||
|
||||
```bash
|
||||
cd Bashrc
|
||||
cd ps1-craft
|
||||
```
|
||||
|
||||
3) Run the user installer:
|
||||
@@ -194,6 +222,12 @@ echo "Your punchline" | sudo tee /etc/ps1-punchline >/dev/null
|
||||
|
||||
## 🎛️ Themes & Style Packs
|
||||
|
||||
Terminology:
|
||||
|
||||
- Theme = palette + emoji set
|
||||
- Style = layout + separators
|
||||
- Pack = a curated set of styles/themes
|
||||
|
||||
### 🏁 Contest Pack
|
||||
|
||||
The contest pack is a bold, DEFCON-ready set of five styles (Aurora, Neon, Forge, Circuit, Mono) with optional layout order. It always starts on a new line and ends with `@host - /path`.
|
||||
@@ -225,11 +259,13 @@ Custom styles add a small context badge when relevant (`ssh`, `ctr`, `git`).
|
||||
|
||||
The Git theme adds a repo-aware capsule on line 2 that only appears inside a Git repo. The branch name is wrapped as `⟦branch⟧`, and status emojis reflect state:
|
||||
|
||||
- Clean: ✨
|
||||
- Dirty: 🔨
|
||||
- Staged: 📌
|
||||
- Untracked: 🧷
|
||||
- Stashed: 📦
|
||||
```text
|
||||
Clean ✨
|
||||
Dirty 🔨
|
||||
Staged 📌
|
||||
Untracked 🧷
|
||||
Stashed 📦
|
||||
```
|
||||
|
||||
It uses the same two-block layout as Aurora, but focuses on signal and minimal noise for fast scanning. Use it when you want repo status on every command without a full VCS prompt.
|
||||
|
||||
@@ -294,12 +330,16 @@ Meaning:
|
||||
|
||||
```text
|
||||
.
|
||||
├── .context.json
|
||||
├── contest-styles.json
|
||||
├── images/
|
||||
│ ├── bash-pallete.png
|
||||
│ └── contest.png
|
||||
│ └── themes/
|
||||
├── .editorconfig
|
||||
├── .github/
|
||||
│ └── workflows/
|
||||
│ └── shellcheck.yml
|
||||
├── .gitignore
|
||||
├── CONTRIBUTING.md
|
||||
├── LICENSE
|
||||
├── README.md
|
||||
├── UNINSTALL.md
|
||||
├── library.md
|
||||
├── dotfiles/
|
||||
│ ├── banner/
|
||||
│ │ └── banner.sh
|
||||
@@ -310,7 +350,9 @@ Meaning:
|
||||
│ ├── install-linux-global.sh
|
||||
│ ├── install-macos-user.sh
|
||||
│ └── install-nerdfont.sh
|
||||
└── README.md
|
||||
└── images/
|
||||
├── bash-pallete.png
|
||||
└── themes/
|
||||
```
|
||||
|
||||
<details>
|
||||
@@ -318,7 +360,7 @@ Meaning:
|
||||
|
||||
Sometimes autodetection doesn’t work (e.g., on macOS without fontconfig):
|
||||
|
||||
Force Nerd Font glyphs:
|
||||
Force Nerd Fonts glyphs:
|
||||
|
||||
```bash
|
||||
export PS1_FORCE_NF=1
|
||||
@@ -335,6 +377,14 @@ Add these to your `~/.bashrc` or `~/.bash_profile`.
|
||||
|
||||
---
|
||||
|
||||
## ⚙️ Performance Notes
|
||||
|
||||
- Git capsule work only runs inside a Git repo and only when enabled
|
||||
- Large repos can slow status checks; disable with `PS1_GIT=0` or avoid the Git theme
|
||||
- Prompt logic avoids external commands unless a feature is enabled (banner, git capsule)
|
||||
|
||||
---
|
||||
|
||||
<details>
|
||||
<summary><strong>Disable prompt (per user)</strong></summary>
|
||||
|
||||
@@ -445,10 +495,7 @@ Palette reference:
|
||||
|
||||
Want to help improve this project?
|
||||
|
||||
- Fork the repository
|
||||
- Make your changes
|
||||
- Open a merge request
|
||||
- Please keep consistent colors and styles
|
||||
- See [CONTRIBUTING.md](CONTRIBUTING.md) for style rules and how to add a new theme/palette
|
||||
|
||||
---
|
||||
|
||||
|
||||
35
UNINSTALL.md
Normal file
35
UNINSTALL.md
Normal file
@@ -0,0 +1,35 @@
|
||||
# Uninstall
|
||||
|
||||
## Linux / WSL (global)
|
||||
|
||||
Remove installed files:
|
||||
|
||||
```bash
|
||||
sudo rm -f /etc/profile.d/ps1.sh /etc/profile.d/banner.sh
|
||||
sudo rm -f /etc/ps1-season /etc/ps1-style /etc/ps1-punchline
|
||||
```
|
||||
|
||||
Remove the managed block from `/etc/bash.bashrc`:
|
||||
|
||||
```bash
|
||||
sudo sed -i '/# >>> dotfiles (managed) >>>/,/# <<< dotfiles (managed) <<</d' /etc/bash.bashrc
|
||||
```
|
||||
|
||||
Open a new shell to confirm the prompt is gone.
|
||||
|
||||
## macOS (per-user)
|
||||
|
||||
Remove installed files:
|
||||
|
||||
```bash
|
||||
rm -f ~/.config/ps1/ps1.sh ~/.config/ps1/season ~/.config/ps1/style
|
||||
```
|
||||
|
||||
Remove the managed block from your shell configs:
|
||||
|
||||
```bash
|
||||
sed -i '' '/# >>> user ps1 (managed) >>>/,/# <<< user ps1 (managed) <<</d' ~/.bashrc
|
||||
sed -i '' '/# >>> user ps1 (managed) >>>/,/# <<< user ps1 (managed) <<</d' ~/.bash_profile
|
||||
```
|
||||
|
||||
Open a new shell or run `source ~/.bashrc`.
|
||||
@@ -1,440 +0,0 @@
|
||||
{
|
||||
"project": "Bashrc Dotfiles",
|
||||
"branch": "main",
|
||||
"purpose": "DEFCON contest + custom render pack for PS1 styles",
|
||||
"contest_pack": {
|
||||
"layout_options": [
|
||||
"day-time-user",
|
||||
"user-time",
|
||||
"time-user",
|
||||
"day-time"
|
||||
],
|
||||
"host_path_format": "@host - /path",
|
||||
"prefix_newline": true,
|
||||
"emoji_set": {
|
||||
"sunrise": [
|
||||
"⚡️",
|
||||
"🛰️",
|
||||
"🧬",
|
||||
"🧠"
|
||||
],
|
||||
"work": [
|
||||
"🛠️",
|
||||
"💾",
|
||||
"🧪",
|
||||
"🧩"
|
||||
],
|
||||
"coffee": "☕",
|
||||
"evening": "🎛️",
|
||||
"night": "🕶️"
|
||||
}
|
||||
},
|
||||
"prompt_spacing": {
|
||||
"emoji_padding": 2,
|
||||
"note": "Two spaces after the emoji before the cursor"
|
||||
},
|
||||
"emoji_rules": {
|
||||
"fixed_times": [
|
||||
"11:00-11:29 => 🥪",
|
||||
"16:00-16:59 => 🍲"
|
||||
],
|
||||
"time_slots": {
|
||||
"sunrise": "05:00-08:59",
|
||||
"coffee": "09:00-10:59",
|
||||
"work": "11:30-15:59",
|
||||
"evening": "17:00-22:59",
|
||||
"night": "23:00-04:59"
|
||||
},
|
||||
"rotation": "Daily rotation by day-of-year with season offsets."
|
||||
},
|
||||
"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": "🌙"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": [
|
||||
{
|
||||
"id": "aurora",
|
||||
"name": "Aurora",
|
||||
"tagline": "Seasonal powerline glow",
|
||||
"description": "Two-line powerline blocks with seasonal palette and calm hierarchy.",
|
||||
"layout": {
|
||||
"line1": "date time user | @host path",
|
||||
"line2": "status arrow + emoji"
|
||||
},
|
||||
"colors": {
|
||||
"palette_source": "seasonal",
|
||||
"seasonal": true
|
||||
},
|
||||
"preview": "[date time user] > [@host /path]"
|
||||
},
|
||||
{
|
||||
"id": "neon",
|
||||
"name": "Neon",
|
||||
"tagline": "Cyber-magenta strike",
|
||||
"description": "Magenta + cyan blocks, high contrast, aggressive read.",
|
||||
"layout": {
|
||||
"line1": "user time | @host path",
|
||||
"line2": "status arrow + emoji"
|
||||
},
|
||||
"colors": {
|
||||
"zone1_bg": 201,
|
||||
"zone1_fg": 255,
|
||||
"zone2_bg": 45,
|
||||
"zone2_fg": 16,
|
||||
"path_fg": 16,
|
||||
"frame": 199
|
||||
},
|
||||
"preview": "[user time] > [@host /path]"
|
||||
},
|
||||
{
|
||||
"id": "forge",
|
||||
"name": "Forge",
|
||||
"tagline": "Copper heatline",
|
||||
"description": "Warm copper blocks with heavy frame and bold emphasis.",
|
||||
"layout": {
|
||||
"line1": "date time user | @host path",
|
||||
"line2": "status arrow + emoji"
|
||||
},
|
||||
"colors": {
|
||||
"zone1_bg": 94,
|
||||
"zone1_fg": 230,
|
||||
"zone2_bg": 166,
|
||||
"zone2_fg": 231,
|
||||
"path_fg": 224,
|
||||
"frame": 130
|
||||
},
|
||||
"preview": "[date time user] > [@host /path]"
|
||||
},
|
||||
{
|
||||
"id": "circuit",
|
||||
"name": "Circuit",
|
||||
"tagline": "Green scanline rail",
|
||||
"description": "Minimal rails, green scanline glow, compact density.",
|
||||
"layout": {
|
||||
"line1": "user time - @host path",
|
||||
"line2": "status arrow + emoji"
|
||||
},
|
||||
"colors": {
|
||||
"fg_primary": 46,
|
||||
"fg_dim": 22,
|
||||
"path_fg": 120
|
||||
},
|
||||
"preview": "[user time] - @host /path"
|
||||
},
|
||||
{
|
||||
"id": "mono",
|
||||
"name": "Mono",
|
||||
"tagline": "No-frills sniper view",
|
||||
"description": "Monochrome clarity with minimal chrome.",
|
||||
"layout": {
|
||||
"line1": "date time user @host path",
|
||||
"line2": "status arrow + emoji"
|
||||
},
|
||||
"colors": {
|
||||
"fg_primary": 250,
|
||||
"fg_dim": 240
|
||||
},
|
||||
"preview": "[date time user] @host /path"
|
||||
},
|
||||
{
|
||||
"id": "git",
|
||||
"name": "Git",
|
||||
"tagline": "Repo-aware minimalism",
|
||||
"description": "Minimal blocks with git capsule on line 2.",
|
||||
"layout": {
|
||||
"line1": "date time user | @host - /path",
|
||||
"line2": "status arrow + emoji + git"
|
||||
},
|
||||
"colors": {
|
||||
"zone1_bg": 61,
|
||||
"zone1_fg": 255,
|
||||
"zone2_bg": 37,
|
||||
"zone2_fg": 255,
|
||||
"path_fg": 194,
|
||||
"frame": 60
|
||||
},
|
||||
"preview": "[date time user] @host - /path (git)"
|
||||
},
|
||||
{
|
||||
"id": "hawolex",
|
||||
"name": "Hawolex",
|
||||
"tagline": "Winter neon, tech icons",
|
||||
"description": "Contest layout with winter-strong palette and tech emojis.",
|
||||
"layout": {
|
||||
"line1": "date time user | @host - /path",
|
||||
"line2": "status arrow + emoji"
|
||||
},
|
||||
"colors": {
|
||||
"zone1_bg": 54,
|
||||
"zone1_fg": 255,
|
||||
"zone2_bg": 31,
|
||||
"zone2_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.",
|
||||
"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": "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": {
|
||||
"winter": { "Z1_BG": 59, "Z2_BG": 61, "Z3_BG": 63, "Z4_BG": 38, "Z5_BG": 37, "Z1_FG": 255, "Z2_FG": 255, "PATH_FG": 152, "FRAME": 60 },
|
||||
"spring": { "Z1_BG": 68, "Z2_BG": 70, "Z3_BG": 72, "Z4_BG": 121, "Z5_BG": 120, "Z1_FG": 255, "Z2_FG": 22, "PATH_FG": 28, "FRAME": 65 },
|
||||
"summer": { "Z1_BG": 141, "Z2_BG": 142, "Z3_BG": 143, "Z4_BG": 214, "Z5_BG": 208, "Z1_FG": 255, "Z2_FG": 0, "PATH_FG": 0, "FRAME": 130 },
|
||||
"autumn": { "Z1_BG": 93, "Z2_BG": 95, "Z3_BG": 97, "Z4_BG": 166, "Z5_BG": 136, "Z1_FG": 255, "Z2_FG": 255, "PATH_FG": 223, "FRAME": 95 }
|
||||
},
|
||||
"notes": [
|
||||
"Palette values are 256-color codes.",
|
||||
"Aurora uses seasonal palettes; other styles use fixed palettes.",
|
||||
"Previews are textual layout hints for rendering.",
|
||||
"Contest pack prepends a blank line and always ends with host - path."
|
||||
]
|
||||
}
|
||||
@@ -220,6 +220,7 @@ __try_source_git_prompt() {
|
||||
"/etc/bash_completion.d/git-prompt.sh"
|
||||
)
|
||||
for f in "${candidates[@]}"; do
|
||||
# shellcheck disable=SC1090
|
||||
[[ -r "$f" ]] && source "$f" && return 0
|
||||
done
|
||||
return 1
|
||||
@@ -380,7 +381,9 @@ _ps1_symbol() {
|
||||
coffee="☕"; evening="🌆"; night="🌙"
|
||||
;;
|
||||
*)
|
||||
# shellcheck disable=SC2034
|
||||
sunrise_list=( "🏔️" "🌨️" "❄️" "🌌" )
|
||||
# shellcheck disable=SC2034
|
||||
work_list=( "🎿" "⛷️" "🏂" "🧊" )
|
||||
coffee="☕"; evening="🌆"; night="🌙"
|
||||
;;
|
||||
@@ -720,7 +723,8 @@ ${PREFIX}${M_FG}⟦${L1}⟧ ${M_DIM}${HOST_PART}${PATH_SEP}${M_FG}${PATH_PART}${
|
||||
local G_Z2_BG="\[\e[48;5;37m\]"
|
||||
local G_Z2_FG="\[\e[38;5;255m\]"
|
||||
local G_PATH_FG="\[\e[38;5;194m\]"
|
||||
local GIT_INFO="$(__git_capsule)"
|
||||
local GIT_INFO
|
||||
GIT_INFO="$(__git_capsule)"
|
||||
local G_LEFT=""
|
||||
local G_RIGHT=""
|
||||
local G_SEP=""
|
||||
@@ -864,7 +868,8 @@ ${T_FRAME}╭─${RST}${T_MAIN}${L1}${RST} ${T_FRAME}${L_HOST}${RST} $(_ps1_path
|
||||
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)"
|
||||
local G_SEP
|
||||
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}"
|
||||
|
||||
@@ -2,6 +2,28 @@
|
||||
|
||||
This file lists every prompt theme, color codes, design intent, and configuration options.
|
||||
|
||||
## Git Capsule (optional, all themes)
|
||||
|
||||
What it is: a compact git status block shown on line 2 when you're inside a git repo.
|
||||
It uses `__git_ps1` when available, with a safe fallback to `git rev-parse` for the branch.
|
||||
|
||||
States + emojis (plain language):
|
||||
- Clean repo: ✨ no local changes; your files match the last commit
|
||||
- Dirty working tree: 🔨 you edited tracked files but haven’t staged them yet
|
||||
- Staged changes: 📌 changes are staged and ready to commit
|
||||
- Untracked files: 🧷 new files git hasn’t started tracking
|
||||
- Stashed changes: 📦 work saved with `git stash` (not in your working tree)
|
||||
|
||||
How it works:
|
||||
- The capsule only renders when a repo is detected (no extra noise outside git).
|
||||
- If `__git_ps1` is available, it reads git state flags and maps them to emojis.
|
||||
- If not, it falls back to the current branch/short SHA (still useful, but fewer states).
|
||||
|
||||
Best practices:
|
||||
- Keep the capsule on during active work; it surfaces risk at a glance.
|
||||
- If you want faster prompts in very large repos, leave untracked detection off.
|
||||
- Use the Git theme for a minimal, work-safe look with the capsule always enabled.
|
||||
|
||||
## Seasonal (Aurora, Standard Pack)
|
||||
|
||||
Design intent: calm, readable, long-session comfort with a subtle five-step gradient
|
||||
Reference in New Issue
Block a user