diff --git a/.context.json b/.context.json new file mode 100644 index 0000000..02e53cb --- /dev/null +++ b/.context.json @@ -0,0 +1,300 @@ +{ + "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" + }, + "branches": { + "main": { + "notes": [ + "Shared PS1 module in dotfiles/ps1/ps1.sh is source of truth for both Linux and macOS installers.", + "README documents 4seasons branch, seasonal ranges, static/dynamic choice.", + "README example image uses images/bash-pallete.png." + ] + }, + "dev": { + "notes": [ + "Active development branch for seasonal palettes and emoji updates.", + "Seasonal palettes and installer prompts implemented.", + "Seasonal emoji accents with fixed lunch/dinner are enabled." + ] + }, + "4seasons": { + "notes": [ + "Branch with seasonal palettes feature set and README updates.", + "Includes seasonal palette image and seasonal selection documentation." + ] + } + }, + "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", + "palette_image": "images/bash-pallete.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 (if PS1 selected)", + "Season pick (if single season)", + "Contest layout selection (if contest)", + "Style preset selection (if contest)" + ], + "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", + "Season pick (if single season)", + "Contest layout selection (if contest)", + "Style preset selection (if contest)" + ], + "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": 61, + "Z1_FG": 255, + "Z2_BG": 37, + "Z2_FG": 255, + "PATH_FG": 194, + "FRAME": 60 + }, + "spring": { + "Z1_BG": 71, + "Z1_FG": 255, + "Z2_BG": 120, + "Z2_FG": 22, + "PATH_FG": 22, + "FRAME": 65 + }, + "summer": { + "Z1_BG": 142, + "Z1_FG": 255, + "Z2_BG": 214, + "Z2_FG": 0, + "PATH_FG": 232, + "FRAME": 130 + }, + "autumn": { + "Z1_BG": 95, + "Z1_FG": 255, + "Z2_BG": 173, + "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" + } + ], + "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", + "config_file_keys": [ + "PS1_STYLE", + "PS1_STYLE_PACK", + "PS1_CONTEST_LAYOUT" + ] + } + }, + "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": "๐Ÿ•ถ๏ธ" + }, + "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", + "line2": "status arrow + emoji", + "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.", + "README on main references 4seasons branch for seasonal palettes and uses images/bash-pallete.png." + ] +} diff --git a/contest-styles.json b/contest-styles.json new file mode 100644 index 0000000..ef9732d --- /dev/null +++ b/contest-styles.json @@ -0,0 +1,130 @@ +{ + "project": "Bashrc Dotfiles", + "branch": "dev", + "purpose": "DEFCON contest 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": "๐Ÿ•ถ๏ธ" + } + }, + "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" + } + ], + "seasonal_palettes": { + "winter": { "Z1_BG": 61, "Z1_FG": 255, "Z2_BG": 37, "Z2_FG": 255, "PATH_FG": 194, "FRAME": 60 }, + "spring": { "Z1_BG": 71, "Z1_FG": 255, "Z2_BG": 120, "Z2_FG": 22, "PATH_FG": 22, "FRAME": 65 }, + "summer": { "Z1_BG": 142, "Z1_FG": 255, "Z2_BG": 214, "Z2_FG": 0, "PATH_FG": 232, "FRAME": 130 }, + "autumn": { "Z1_BG": 95, "Z1_FG": 255, "Z2_BG": 173, "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." + ] +} diff --git a/images/contest.png b/images/contest.png new file mode 100644 index 0000000..d65c857 Binary files /dev/null and b/images/contest.png differ