|
| 1 | +# oh-my-chill Theme Repository |
| 2 | + |
| 3 | +oh-my-chill is a pastel-themed configuration for oh-my-posh, a cross-platform prompt theme engine for shells (bash, zsh, PowerShell, etc.). |
| 4 | + |
| 5 | +**ALWAYS reference these instructions first and fallback to search or bash commands only when you encounter unexpected information that does not match the info here.** |
| 6 | + |
| 7 | +## Working Effectively |
| 8 | + |
| 9 | +### Bootstrap and Setup |
| 10 | +- Install oh-my-posh binary: |
| 11 | + - `curl -s -L -o /tmp/oh-my-posh https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64` |
| 12 | + - `chmod +x /tmp/oh-my-posh` |
| 13 | + - Download takes ~5 seconds, binary is ~19MB |
| 14 | +- Validate JSON configuration: |
| 15 | + - `python3 -m json.tool oh-my-chill.omp.json > /dev/null` -- takes <1 second |
| 16 | + - `jq '.' oh-my-chill.omp.json > /dev/null` -- alternative validation method |
| 17 | + |
| 18 | +### Testing and Validation |
| 19 | +- Test theme rendering: |
| 20 | + - `/tmp/oh-my-posh print primary --config oh-my-chill.omp.json` -- takes <1 second |
| 21 | + - Should display: `╭─username@hostname─[/current/path]` and `╰─[git-branch-info]- ⚡` |
| 22 | +- Debug theme configuration: |
| 23 | + - `/tmp/oh-my-posh debug --config oh-my-chill.omp.json` -- takes <1 second |
| 24 | + - Shows all segments, timing, and cache information |
| 25 | +- Validate theme schema: |
| 26 | + - Theme uses official schema: `https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json` |
| 27 | + - All segments should load without errors |
| 28 | + |
| 29 | +### Making Changes |
| 30 | +- ALWAYS validate JSON syntax after editing: `python3 -m json.tool oh-my-chill.omp.json > /dev/null` |
| 31 | +- ALWAYS test theme rendering after changes: `/tmp/oh-my-posh print primary --config oh-my-chill.omp.json` |
| 32 | +- ALWAYS run debug mode to verify segments work: `/tmp/oh-my-posh debug --config oh-my-chill.omp.json` |
| 33 | + |
| 34 | +## Validation Scenarios |
| 35 | + |
| 36 | +**CRITICAL**: After making any changes to the theme configuration, ALWAYS run through these complete validation scenarios: |
| 37 | + |
| 38 | +### Basic Theme Functionality |
| 39 | +1. Validate JSON: `python3 -m json.tool oh-my-chill.omp.json > /dev/null` |
| 40 | +2. Test primary prompt: `/tmp/oh-my-posh print primary --config oh-my-chill.omp.json` |
| 41 | +3. Verify segments load: `/tmp/oh-my-posh debug --config oh-my-chill.omp.json | grep -E "Session|Path|Git|Status"` |
| 42 | +4. Check for errors: `/tmp/oh-my-posh debug --config oh-my-chill.omp.json | grep -i error` |
| 43 | + |
| 44 | +### Git Integration Testing |
| 45 | +1. Ensure you're in a git repository with changes: `git status` |
| 46 | +2. Test git segment rendering: `/tmp/oh-my-posh print primary --config oh-my-chill.omp.json` |
| 47 | +3. Verify git branch and status indicators appear in prompt output |
| 48 | +4. Check git segment debug info: `/tmp/oh-my-posh debug --config oh-my-chill.omp.json | grep "Git("` |
| 49 | + |
| 50 | +### Multi-Environment Testing |
| 51 | +1. Test in directory with package.json (Node.js detection) |
| 52 | +2. Test in directory with pyproject.toml or requirements.txt (Python detection) |
| 53 | +3. Verify language-specific segments activate correctly |
| 54 | +4. Check segment timing in debug output |
| 55 | + |
| 56 | +## Repository Structure |
| 57 | + |
| 58 | +### Key Files |
| 59 | +``` |
| 60 | +. |
| 61 | +├── README.md # Basic theme description |
| 62 | +├── oh-my-chill.omp.json # Main theme configuration file |
| 63 | +└── .github/ |
| 64 | + └── copilot-instructions.md # This file |
| 65 | +``` |
| 66 | + |
| 67 | +### Theme Configuration Details |
| 68 | +- **Schema**: Uses official oh-my-posh v1 schema |
| 69 | +- **Segments**: Session, Path, Git, Language detection (Node, Python, Java, etc.), Status |
| 70 | +- **Style**: Pastel colors with Unicode box-drawing characters |
| 71 | +- **Layout**: Two-line prompt with right-aligned language indicators |
| 72 | + |
| 73 | +## Common Tasks |
| 74 | + |
| 75 | +### Adding New Segments |
| 76 | +1. Reference official documentation: https://ohmyposh.dev/docs/segments |
| 77 | +2. Add segment to appropriate `blocks` array in `oh-my-chill.omp.json` |
| 78 | +3. Validate JSON syntax: `python3 -m json.tool oh-my-chill.omp.json > /dev/null` |
| 79 | +4. Test rendering: `/tmp/oh-my-posh print primary --config oh-my-chill.omp.json` |
| 80 | +5. Run debug mode to verify segment loads: `/tmp/oh-my-posh debug --config oh-my-chill.omp.json` |
| 81 | + |
| 82 | +### Color Customization |
| 83 | +1. Colors use hex format (`#ffffff`) or named colors (`red`, `blue`, etc.) |
| 84 | +2. Template colors use `<#color>text</>` format |
| 85 | +3. Always test color changes visually: `/tmp/oh-my-posh print primary --config oh-my-chill.omp.json` |
| 86 | + |
| 87 | +### Performance Optimization |
| 88 | +1. Check segment timing: `/tmp/oh-my-posh debug --config oh-my-chill.omp.json | grep " - .*ms"` |
| 89 | +2. Segments should typically take <5ms each |
| 90 | +3. Total run duration should be <50ms |
| 91 | + |
| 92 | +## Timing and Expectations |
| 93 | + |
| 94 | +- **JSON validation**: <1 second |
| 95 | +- **Theme rendering**: <1 second |
| 96 | +- **Debug mode**: <1 second |
| 97 | +- **oh-my-posh download**: ~5 seconds (19MB binary) |
| 98 | +- **Theme installation**: Immediate (copy file) |
| 99 | + |
| 100 | +**NEVER CANCEL** these operations - they all complete in seconds, not minutes. |
| 101 | + |
| 102 | +## Dependencies and Installation |
| 103 | + |
| 104 | +### Required Tools |
| 105 | +- `python3` - for JSON validation (always available) |
| 106 | +- `jq` - alternative JSON validation tool (usually available) |
| 107 | +- `curl` - for downloading oh-my-posh binary (always available) |
| 108 | +- `git` - for testing git segment functionality (always available) |
| 109 | + |
| 110 | +### oh-my-posh Installation |
| 111 | +- Download URL: `https://github.com/JanDeDobbeleer/oh-my-posh/releases/latest/download/posh-linux-amd64` |
| 112 | +- Size: ~19MB |
| 113 | +- Installation: Download to `/tmp/oh-my-posh` and `chmod +x` |
| 114 | +- No system dependencies required |
| 115 | + |
| 116 | +## Error Handling |
| 117 | + |
| 118 | +### Common Issues |
| 119 | +1. **JSON syntax errors**: Use `python3 -m json.tool` to identify line numbers and exact error location |
| 120 | +2. **Segment not loading**: Check debug output for segment name and timing |
| 121 | +3. **Colors not showing**: Verify terminal supports ANSI colors |
| 122 | +4. **Git segment empty**: Ensure you're in a git repository with status |
| 123 | +5. **Cache errors**: ERROR messages about cache files are normal and can be ignored |
| 124 | +6. **wslpath errors**: ERROR about wslpath not found is normal on Linux and can be ignored |
| 125 | + |
| 126 | +### Debugging Steps |
| 127 | +1. Always run debug mode first: `/tmp/oh-my-posh debug --config oh-my-chill.omp.json` |
| 128 | +2. Check for ERROR/TRACE messages in debug output |
| 129 | +3. Verify JSON syntax is valid |
| 130 | +4. Test in known working directory (git repo with changes) |
| 131 | + |
| 132 | +## Frequently Used Commands |
| 133 | + |
| 134 | +### Repository Root Structure |
| 135 | +```bash |
| 136 | +ls -la |
| 137 | +# Output: |
| 138 | +# drwxr-xr-x 3 runner docker 4096 . |
| 139 | +# drwxr-xr-x 3 runner docker 4096 .. |
| 140 | +# drwxr-xr-x 7 runner docker 4096 .git |
| 141 | +# -rw-r--r-- 1 runner docker 51 README.md |
| 142 | +# -rw-r--r-- 1 runner docker 5344 oh-my-chill.omp.json |
| 143 | +``` |
| 144 | + |
| 145 | +### Theme Configuration Content |
| 146 | +The theme includes segments for: |
| 147 | +- User session (username@hostname) |
| 148 | +- Current path with full directory structure |
| 149 | +- Git status with branch and change indicators |
| 150 | +- Language environment detection (Node.js, Python, Java, .NET, Go, Rust, etc.) |
| 151 | +- Command execution status |
| 152 | + |
| 153 | +All segments use pastel color scheme with Unicode box-drawing characters for visual appeal. |
0 commit comments