ohmyposh-configurator 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +342 -0
- package/dist/mcp/apps/preview/configs/community/README.md +66 -0
- package/dist/mcp/apps/preview/configs/community/cinnamon-1_shell.json +136 -0
- package/dist/mcp/apps/preview/configs/community/dotnet-azure-developer.json +134 -0
- package/dist/mcp/apps/preview/configs/community/manifest.json +35 -0
- package/dist/mcp/apps/preview/configs/official/manifest.json +1414 -0
- package/dist/mcp/apps/preview/configs/samples/all-segments.json +1069 -0
- package/dist/mcp/apps/preview/configs/samples/cloud-engineer.json +96 -0
- package/dist/mcp/apps/preview/configs/samples/data-scientist.json +106 -0
- package/dist/mcp/apps/preview/configs/samples/developer-pro.json +142 -0
- package/dist/mcp/apps/preview/configs/samples/full-stack.json +125 -0
- package/dist/mcp/apps/preview/configs/samples/manifest.json +107 -0
- package/dist/mcp/apps/preview/configs/samples/minimal.json +46 -0
- package/dist/mcp/apps/preview/configs/samples/streamer.json +83 -0
- package/dist/mcp/apps/preview/favicon.svg +12 -0
- package/dist/mcp/apps/preview/fonts/nerd-symbols-subset.ttf +0 -0
- package/dist/mcp/apps/preview/fonts/nerd-symbols-subset.woff2 +0 -0
- package/dist/mcp/apps/preview/fonts/subset-manifest.json +285 -0
- package/dist/mcp/apps/preview/humans.txt +16 -0
- package/dist/mcp/apps/preview/index.html +96 -0
- package/dist/mcp/apps/preview/manifest.json +30 -0
- package/dist/mcp/apps/preview/mcp.html +595 -0
- package/dist/mcp/apps/preview/og-image.svg +41 -0
- package/dist/mcp/apps/preview/robots.txt +4 -0
- package/dist/mcp/apps/preview/segments/README.md +186 -0
- package/dist/mcp/apps/preview/segments/cli.json +2155 -0
- package/dist/mcp/apps/preview/segments/cloud.json +522 -0
- package/dist/mcp/apps/preview/segments/health.json +146 -0
- package/dist/mcp/apps/preview/segments/languages.json +2295 -0
- package/dist/mcp/apps/preview/segments/music.json +206 -0
- package/dist/mcp/apps/preview/segments/scm.json +606 -0
- package/dist/mcp/apps/preview/segments/system.json +764 -0
- package/dist/mcp/apps/preview/segments/web.json +332 -0
- package/dist/mcp/apps/preview/sitemap.xml +9 -0
- package/dist/mcp/apps/segments/configs/community/README.md +66 -0
- package/dist/mcp/apps/segments/configs/community/cinnamon-1_shell.json +136 -0
- package/dist/mcp/apps/segments/configs/community/dotnet-azure-developer.json +134 -0
- package/dist/mcp/apps/segments/configs/community/manifest.json +35 -0
- package/dist/mcp/apps/segments/configs/official/manifest.json +1414 -0
- package/dist/mcp/apps/segments/configs/samples/all-segments.json +1069 -0
- package/dist/mcp/apps/segments/configs/samples/cloud-engineer.json +96 -0
- package/dist/mcp/apps/segments/configs/samples/data-scientist.json +106 -0
- package/dist/mcp/apps/segments/configs/samples/developer-pro.json +142 -0
- package/dist/mcp/apps/segments/configs/samples/full-stack.json +125 -0
- package/dist/mcp/apps/segments/configs/samples/manifest.json +107 -0
- package/dist/mcp/apps/segments/configs/samples/minimal.json +46 -0
- package/dist/mcp/apps/segments/configs/samples/streamer.json +83 -0
- package/dist/mcp/apps/segments/favicon.svg +12 -0
- package/dist/mcp/apps/segments/fonts/nerd-symbols-subset.ttf +0 -0
- package/dist/mcp/apps/segments/fonts/nerd-symbols-subset.woff2 +0 -0
- package/dist/mcp/apps/segments/fonts/subset-manifest.json +285 -0
- package/dist/mcp/apps/segments/humans.txt +16 -0
- package/dist/mcp/apps/segments/index.html +96 -0
- package/dist/mcp/apps/segments/manifest.json +30 -0
- package/dist/mcp/apps/segments/mcp.html +595 -0
- package/dist/mcp/apps/segments/og-image.svg +41 -0
- package/dist/mcp/apps/segments/robots.txt +4 -0
- package/dist/mcp/apps/segments/segments/README.md +186 -0
- package/dist/mcp/apps/segments/segments/cli.json +2155 -0
- package/dist/mcp/apps/segments/segments/cloud.json +522 -0
- package/dist/mcp/apps/segments/segments/health.json +146 -0
- package/dist/mcp/apps/segments/segments/languages.json +2295 -0
- package/dist/mcp/apps/segments/segments/music.json +206 -0
- package/dist/mcp/apps/segments/segments/scm.json +606 -0
- package/dist/mcp/apps/segments/segments/system.json +764 -0
- package/dist/mcp/apps/segments/segments/web.json +332 -0
- package/dist/mcp/apps/segments/sitemap.xml +9 -0
- package/dist/mcp/index.d.ts +14 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +928 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/lib/__tests__/configBuilder.test.d.ts +5 -0
- package/dist/mcp/lib/__tests__/configBuilder.test.d.ts.map +1 -0
- package/dist/mcp/lib/__tests__/configBuilder.test.js +158 -0
- package/dist/mcp/lib/__tests__/configBuilder.test.js.map +1 -0
- package/dist/mcp/lib/__tests__/configValidator.test.d.ts +5 -0
- package/dist/mcp/lib/__tests__/configValidator.test.d.ts.map +1 -0
- package/dist/mcp/lib/__tests__/configValidator.test.js +246 -0
- package/dist/mcp/lib/__tests__/configValidator.test.js.map +1 -0
- package/dist/mcp/lib/configBuilder.d.ts +68 -0
- package/dist/mcp/lib/configBuilder.d.ts.map +1 -0
- package/dist/mcp/lib/configBuilder.js +151 -0
- package/dist/mcp/lib/configBuilder.js.map +1 -0
- package/dist/mcp/lib/configExporter.d.ts +21 -0
- package/dist/mcp/lib/configExporter.d.ts.map +1 -0
- package/dist/mcp/lib/configExporter.js +142 -0
- package/dist/mcp/lib/configExporter.js.map +1 -0
- package/dist/mcp/lib/configLoader.d.ts +54 -0
- package/dist/mcp/lib/configLoader.d.ts.map +1 -0
- package/dist/mcp/lib/configLoader.js +91 -0
- package/dist/mcp/lib/configLoader.js.map +1 -0
- package/dist/mcp/lib/configValidator.d.ts +28 -0
- package/dist/mcp/lib/configValidator.d.ts.map +1 -0
- package/dist/mcp/lib/configValidator.js +177 -0
- package/dist/mcp/lib/configValidator.js.map +1 -0
- package/dist/mcp/lib/segmentLoader.d.ts +34 -0
- package/dist/mcp/lib/segmentLoader.d.ts.map +1 -0
- package/dist/mcp/lib/segmentLoader.js +101 -0
- package/dist/mcp/lib/segmentLoader.js.map +1 -0
- package/dist/mcp/vite.apps.config.d.ts +3 -0
- package/dist/mcp/vite.apps.config.d.ts.map +1 -0
- package/dist/mcp/vite.apps.config.js +56 -0
- package/dist/mcp/vite.apps.config.js.map +1 -0
- package/package.json +73 -0
- package/public/configs/community/README.md +66 -0
- package/public/configs/community/cinnamon-1_shell.json +136 -0
- package/public/configs/community/dotnet-azure-developer.json +134 -0
- package/public/configs/community/manifest.json +35 -0
- package/public/configs/official/manifest.json +1414 -0
- package/public/configs/samples/all-segments.json +1069 -0
- package/public/configs/samples/cloud-engineer.json +96 -0
- package/public/configs/samples/data-scientist.json +106 -0
- package/public/configs/samples/developer-pro.json +142 -0
- package/public/configs/samples/full-stack.json +125 -0
- package/public/configs/samples/manifest.json +107 -0
- package/public/configs/samples/minimal.json +46 -0
- package/public/configs/samples/streamer.json +83 -0
- package/public/segments/README.md +186 -0
- package/public/segments/cli.json +2155 -0
- package/public/segments/cloud.json +522 -0
- package/public/segments/health.json +146 -0
- package/public/segments/languages.json +2295 -0
- package/public/segments/music.json +206 -0
- package/public/segments/scm.json +606 -0
- package/public/segments/system.json +764 -0
- package/public/segments/web.json +332 -0
package/README.md
ADDED
|
@@ -0,0 +1,342 @@
|
|
|
1
|
+
# Oh My Posh Visual Configurator ✨
|
|
2
|
+
|
|
3
|
+
<div align="center">
|
|
4
|
+
|
|
5
|
+

|
|
6
|
+
[](LICENSE)
|
|
7
|
+
[](https://jamesmontemagno.github.io/ohmyposh-configurator/)
|
|
8
|
+
|
|
9
|
+
**Design beautiful terminal prompts without touching configuration files**
|
|
10
|
+
|
|
11
|
+
[🚀 Launch App](https://jamesmontemagno.github.io/ohmyposh-configurator/) • [📖 Documentation](https://ohmyposh.dev/docs/) • [💬 Discussions](https://github.com/jamesmontemagno/ohmyposh-configurator/discussions)
|
|
12
|
+
|
|
13
|
+

|
|
14
|
+
|
|
15
|
+
</div>
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
## 🎯 What is Oh My Posh Configurator?
|
|
20
|
+
|
|
21
|
+
The **Oh My Posh Visual Configurator** is a modern, intuitive web application that lets you design and customize your terminal prompt visually. No more manual JSON editing or trial-and-error configuration—just drag, drop, customize, and export!
|
|
22
|
+
|
|
23
|
+
Perfect for developers, DevOps engineers, and anyone who wants a beautiful, informative terminal prompt for PowerShell, Bash, Zsh, Fish, or any shell supported by [Oh My Posh](https://ohmyposh.dev/).
|
|
24
|
+
|
|
25
|
+
## ✨ Features
|
|
26
|
+
|
|
27
|
+
- 🎨 **103+ Segments**: Browse comprehensive segment library organized in 8 categories with detailed properties and options
|
|
28
|
+
- 🖱️ **Drag & Drop Interface**: Intuitive visual editor with real-time updates
|
|
29
|
+
- ⚡ **Live Preview**: See your prompt instantly with sample data and powerline/diamond styles
|
|
30
|
+
- 🎛️ **Full Customization**: Configure colors, templates, styles, and alignment with inline documentation
|
|
31
|
+
- 🚀 **Progressive Disclosure**: Advanced features hidden by default with settings dialog to show/hide complexity as needed
|
|
32
|
+
- 🎯 **Smart Defaults**: Auto-applied cache settings, intelligent feature detection on import
|
|
33
|
+
- 💡 **Command Tooltips**: Configure command-triggered custom prompts (e.g., show git status when typing `git`)
|
|
34
|
+
- 📚 **Segment Documentation**: Built-in properties and options reference for every segment
|
|
35
|
+
- 📦 **Import & Export**: Support for JSON, YAML, and TOML formats
|
|
36
|
+
- 💾 **Auto-Save**: Never lose your work with automatic browser storage
|
|
37
|
+
- 🎯 **Sample Configs**: Start quickly with 6 pre-built professional templates
|
|
38
|
+
- 👥 **Community Themes**: Browse and share community-contributed configurations
|
|
39
|
+
- 🤝 **Easy Sharing**: Submit your own themes via GitHub PR with built-in tools
|
|
40
|
+
- 🌐 **100% Client-Side**: Your configurations never leave your browser
|
|
41
|
+
- 📱 **Responsive Design**: Works on desktop, tablet, and mobile devices
|
|
42
|
+
- 🎨 **Smart Color Schemes**: Category-based default colors for quick setup
|
|
43
|
+
- 🤖 **MCP Server**: Use AI assistants like Claude to create and manage configurations through natural language ([Learn more](docs/MCP_SERVER.md))
|
|
44
|
+
|
|
45
|
+
## 🗂️ Segment Categories
|
|
46
|
+
|
|
47
|
+
- **System**: Path, OS, Shell, Session, Battery, Time, Execution Time, Status, and more
|
|
48
|
+
- **Version Control**: Git, Mercurial, SVN, Fossil, Plastic SCM, Sapling, Jujutsu
|
|
49
|
+
- **Languages**: Node.js, Python, Go, Rust, Java, .NET, PHP, Ruby, Swift, and 20+ more
|
|
50
|
+
- **Cloud & Infrastructure**: AWS, Azure, GCP, Kubernetes, Terraform, Docker, Pulumi
|
|
51
|
+
- **CLI Tools**: NPM, Yarn, PNPM, Angular, React, Flutter, and many more
|
|
52
|
+
- **Web**: IP Address, Weather, HTTP requests
|
|
53
|
+
- **Music**: Spotify, YouTube Music, Last.fm
|
|
54
|
+
- **Health**: Nightscout, Strava, Withings
|
|
55
|
+
|
|
56
|
+
## 🚀 Getting Started
|
|
57
|
+
|
|
58
|
+
### 🌐 Use Online (Recommended)
|
|
59
|
+
|
|
60
|
+
No installation required! Visit the hosted version:
|
|
61
|
+
|
|
62
|
+
**👉 [https://jamesmontemagno.github.io/ohmyposh-configurator/](https://jamesmontemagno.github.io/ohmyposh-configurator/)**
|
|
63
|
+
|
|
64
|
+
### 💻 Local Development
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
# Clone the repository
|
|
68
|
+
git clone https://github.com/jamesmontemagno/ohmyposh-configurator.git
|
|
69
|
+
cd ohmyposh-configurator
|
|
70
|
+
|
|
71
|
+
# Install dependencies
|
|
72
|
+
npm install
|
|
73
|
+
|
|
74
|
+
# Start development server
|
|
75
|
+
npm run dev
|
|
76
|
+
|
|
77
|
+
# Build for production (includes JSON minification)
|
|
78
|
+
npm run build
|
|
79
|
+
|
|
80
|
+
# Preview production build locally
|
|
81
|
+
npm run preview
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### 🔧 Development Scripts
|
|
85
|
+
|
|
86
|
+
- `npm run dev`: Start Vite development server
|
|
87
|
+
- `npm run build`: Build for production and minify all JSON assets
|
|
88
|
+
- `npm run build:mcp`: Build the MCP server
|
|
89
|
+
- `npm run mcp`: Run the MCP server
|
|
90
|
+
- `npm run preview`: Serve the production build from `dist/`
|
|
91
|
+
- `npm run minify`: Manually minify JSON files in the `public/` directory
|
|
92
|
+
- `npm run format:json`: Expand/format JSON files in `public/` for easier editing
|
|
93
|
+
- `npm run validate`: Validate all configuration files and manifests
|
|
94
|
+
- `npm run lint`: Run ESLint check
|
|
95
|
+
- `npm run test`: Run tests
|
|
96
|
+
|
|
97
|
+
## 🤖 MCP Server (AI-Powered Configuration)
|
|
98
|
+
|
|
99
|
+
Want to create Oh My Posh configurations using natural language with AI assistants? The Oh My Posh Configurator includes a Model Context Protocol (MCP) server that works with **VS Code** and **GitHub Copilot**.
|
|
100
|
+
|
|
101
|
+
**Quick Setup for VS Code:**
|
|
102
|
+
|
|
103
|
+
1. Add to your workspace `.vscode/mcp.json`:
|
|
104
|
+
```json
|
|
105
|
+
{
|
|
106
|
+
"servers": {
|
|
107
|
+
"ohmyposh-configurator": {
|
|
108
|
+
"type": "stdio",
|
|
109
|
+
"command": "node",
|
|
110
|
+
"args": ["/path/to/ohmyposh-configurator/dist/mcp/index.js"]
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
```
|
|
115
|
+
|
|
116
|
+
2. Build the MCP server:
|
|
117
|
+
```bash
|
|
118
|
+
npm run build:mcp
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
3. Open GitHub Copilot Chat in VS Code and start creating prompts with AI!
|
|
122
|
+
|
|
123
|
+
**Example Requests:**
|
|
124
|
+
- "Create me a developer prompt with git and Python"
|
|
125
|
+
- "Add caching to all language segments"
|
|
126
|
+
- "Apply the Dracula color theme"
|
|
127
|
+
- "Help optimize my slow prompt"
|
|
128
|
+
|
|
129
|
+
📖 **[Full MCP Server Documentation](docs/MCP_SERVER.md)**
|
|
130
|
+
|
|
131
|
+
## 📖 Usage
|
|
132
|
+
|
|
133
|
+
### Quick Start Guide
|
|
134
|
+
|
|
135
|
+
1. **🎯 Choose a Starting Point**
|
|
136
|
+
- Start from scratch, or
|
|
137
|
+
- Load a sample configuration, or
|
|
138
|
+
- Browse community themes, or
|
|
139
|
+
- Import your existing Oh My Posh config
|
|
140
|
+
|
|
141
|
+
2. **➕ Add Segments**
|
|
142
|
+
- Browse categories in the left sidebar
|
|
143
|
+
- Click segments to add them to your prompt
|
|
144
|
+
- Or drag them directly to desired positions
|
|
145
|
+
|
|
146
|
+
3. **🎨 Customize**
|
|
147
|
+
- Click any segment to edit properties
|
|
148
|
+
- Adjust colors, styles, and templates
|
|
149
|
+
- Configure powerline, diamond, or plain styles
|
|
150
|
+
|
|
151
|
+
4. **👀 Preview**
|
|
152
|
+
- See changes instantly in the preview panel
|
|
153
|
+
- Toggle between dark and light backgrounds
|
|
154
|
+
- View powerline arrows and diamond shapes
|
|
155
|
+
|
|
156
|
+
5. **💾 Export or Share**
|
|
157
|
+
- Choose your format: JSON, YAML, or TOML
|
|
158
|
+
- Download and use with Oh My Posh
|
|
159
|
+
- Or share your creation with the community!
|
|
160
|
+
|
|
161
|
+
## 🤝 Contributing Your Theme
|
|
162
|
+
|
|
163
|
+
Love your configuration? Share it with the community!
|
|
164
|
+
|
|
165
|
+
1. Click the **"Share"** button in the header
|
|
166
|
+
2. Fill in your theme details (name, description, author, tags)
|
|
167
|
+
3. Copy the generated JSON configuration
|
|
168
|
+
4. Follow the GitHub PR submission steps
|
|
169
|
+
5. See your theme in the Community collection!
|
|
170
|
+
|
|
171
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md) for detailed instructions.
|
|
172
|
+
|
|
173
|
+
### 🔧 Using Your Configuration
|
|
174
|
+
|
|
175
|
+
After downloading your configuration file, follow the [Oh My Posh installation guide](https://ohmyposh.dev/docs/installation/customize) to use it with your shell:
|
|
176
|
+
|
|
177
|
+
```bash
|
|
178
|
+
# PowerShell
|
|
179
|
+
oh-my-posh init pwsh --config ~/your-theme.json | Invoke-Expression
|
|
180
|
+
|
|
181
|
+
# Bash
|
|
182
|
+
eval "$(oh-my-posh init bash --config ~/your-theme.json)"
|
|
183
|
+
|
|
184
|
+
# Zsh
|
|
185
|
+
eval "$(oh-my-posh init zsh --config ~/your-theme.json)"
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
## 🛠️ Technology Stack
|
|
189
|
+
|
|
190
|
+
- **⚛️ Framework**: React 19 with TypeScript
|
|
191
|
+
- **⚡ Build Tool**: Vite 6.4
|
|
192
|
+
- **🎨 Styling**: Tailwind CSS 4.1
|
|
193
|
+
- **🖱️ Drag & Drop**: @dnd-kit (sortable lists and cross-container support)
|
|
194
|
+
- **💾 State Management**: Zustand with localStorage persistence
|
|
195
|
+
- **🎯 Icons**: Custom Nerd Font icon library (200+ icons) with unique IDs
|
|
196
|
+
- **📝 Config Parsing**: js-yaml, @iarna/toml
|
|
197
|
+
- **📦 Data Loading**: Dynamic JSON-based lazy loading with request-deduplication and caching
|
|
198
|
+
|
|
199
|
+
## ⚡ Performance & Optimization
|
|
200
|
+
|
|
201
|
+
- **JSON Minification**: All JSON metadata and configuration files are automatically minified during the production build to reduce payload size.
|
|
202
|
+
- **Smart Caching**: The application implements a request-deduplication and caching layer for all JSON assets. Each file is fetched exactly once, even if requested by multiple components simultaneously.
|
|
203
|
+
- **Lazy Loading**: Segment metadata is loaded on-demand by category, keeping the initial bundle size small.
|
|
204
|
+
|
|
205
|
+
## 🏗️ Project Structure
|
|
206
|
+
|
|
207
|
+
```
|
|
208
|
+
├── public/
|
|
209
|
+
│ ├── configs/ # Sample and community configurations
|
|
210
|
+
│ │ ├── samples/ # 6 pre-built professional templates
|
|
211
|
+
│ │ │ └── manifest.json # Sample configs metadata
|
|
212
|
+
│ │ └── community/ # User-contributed themes
|
|
213
|
+
│ │ └── manifest.json # Community configs metadata
|
|
214
|
+
│ └── segments/ # Segment metadata organized by category (103+ segments)
|
|
215
|
+
│ ├── system.json # 14 system segments (path, battery, time, etc.)
|
|
216
|
+
│ ├── scm.json # 8 version control segments (git, svn, etc.)
|
|
217
|
+
│ ├── languages.json # 26 programming language segments
|
|
218
|
+
│ ├── cloud.json # 12 cloud provider segments
|
|
219
|
+
│ ├── cli.json # 30 CLI tool segments
|
|
220
|
+
│ ├── web.json # 7 web-related segments
|
|
221
|
+
│ ├── music.json # 3 music player segments
|
|
222
|
+
│ ├── health.json # 3 health tracker segments
|
|
223
|
+
│ └── README.md # Documentation for adding segments
|
|
224
|
+
├── src/
|
|
225
|
+
│ ├── components/ # React components
|
|
226
|
+
│ │ ├── Canvas/ # Drag-and-drop prompt builder with tooltips support
|
|
227
|
+
│ │ ├── SegmentPicker/ # Category browser with segments
|
|
228
|
+
│ │ ├── PropertiesPanel/ # Segment, block, tooltip, and global properties editor
|
|
229
|
+
│ │ ├── PreviewPanel/ # Live prompt preview with tooltip previews
|
|
230
|
+
│ │ ├── AdvancedSettingsDialog/ # Progressive disclosure settings for advanced features
|
|
231
|
+
│ │ ├── ExtraPromptsDialog/ # Secondary prompts configuration
|
|
232
|
+
│ │ ├── ConfirmDialog/ # Reusable confirmation dialog
|
|
233
|
+
│ │ └── ...
|
|
234
|
+
│ ├── data/ # Configuration data and color schemes
|
|
235
|
+
│ ├── store/ # Zustand state management with persistence
|
|
236
|
+
│ │ ├── configStore.ts # Main config state (blocks, segments, tooltips, global settings)
|
|
237
|
+
│ │ └── advancedFeaturesStore.ts # Feature toggles for progressive disclosure
|
|
238
|
+
│ ├── types/ # TypeScript type definitions (SegmentMetadata, Tooltip, etc.)
|
|
239
|
+
│ ├── utils/ # Utility functions
|
|
240
|
+
│ │ ├── segmentLoader.ts # Dynamic segment loading with caching
|
|
241
|
+
│ │ ├── configExporter.ts # Export to JSON/YAML/TOML
|
|
242
|
+
│ │ ├── configImporter.ts # Import with auto-feature detection
|
|
243
|
+
│ │ └── unicode.ts # Unicode escape handling
|
|
244
|
+
│ ├── constants/ # Nerd Font icons and other constants
|
|
245
|
+
│ └── hooks/ # Custom React hooks (useConfirm, etc.)
|
|
246
|
+
├── docs/ # Comprehensive documentation
|
|
247
|
+
│ ├── config-migration-guide.md # Guide for config structure updates
|
|
248
|
+
│ ├── segment-json-migration.md # Segment refactoring documentation
|
|
249
|
+
│ ├── quick-reference.md # Quick reference for contributors
|
|
250
|
+
│ └── nerd-font-icons-reference.md # 200+ icon documentation
|
|
251
|
+
└── scripts/ # Build and validation scripts
|
|
252
|
+
├── validate-configs.js # Config validation tool
|
|
253
|
+
└── README.md # Scripts documentation
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Adding New Segments
|
|
257
|
+
|
|
258
|
+
Segments are now stored in separate JSON files by category in `public/segments/`. This makes it easy to add or modify segments without touching the codebase:
|
|
259
|
+
|
|
260
|
+
1. Open the appropriate category file (e.g., `public/segments/languages.json`)
|
|
261
|
+
2. Add your segment with the following structure:
|
|
262
|
+
```json
|
|
263
|
+
{
|
|
264
|
+
"type": "segment-type",
|
|
265
|
+
"name": "Display Name",
|
|
266
|
+
"description": "Brief description",
|
|
267
|
+
"icon": "lang-python",
|
|
268
|
+
"defaultTemplate": " {{ .Property }} ",
|
|
269
|
+
"properties": [
|
|
270
|
+
{
|
|
271
|
+
"name": ".Property",
|
|
272
|
+
"type": "string",
|
|
273
|
+
"description": "Description of this template variable"
|
|
274
|
+
}
|
|
275
|
+
],
|
|
276
|
+
"options": [
|
|
277
|
+
{
|
|
278
|
+
"name": "option_name",
|
|
279
|
+
"type": "boolean",
|
|
280
|
+
"default": true,
|
|
281
|
+
"description": "What this option does"
|
|
282
|
+
}
|
|
283
|
+
],
|
|
284
|
+
"defaultCache": {
|
|
285
|
+
"duration": "168h",
|
|
286
|
+
"strategy": "folder"
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
```
|
|
290
|
+
3. **Properties** are template variables available in `{{ }}` templates (e.g., `.Full`, `.Path`)
|
|
291
|
+
4. **Options** are segment configuration settings (e.g., `home_enabled`, `fetch_version`)
|
|
292
|
+
5. **defaultCache** (optional) provides recommended caching for performance (see Cache Strategy Guide in `public/segments/README.md`)
|
|
293
|
+
6. Segments are loaded dynamically on demand for better performance
|
|
294
|
+
7. Colors are applied automatically from category-based color schemes
|
|
295
|
+
|
|
296
|
+
See [public/segments/README.md](public/segments/README.md) for detailed instructions.
|
|
297
|
+
|
|
298
|
+
## 🔍 SEO & Sharing
|
|
299
|
+
|
|
300
|
+
This project includes comprehensive SEO optimization:
|
|
301
|
+
- ✅ Structured data (JSON-LD) for search engines
|
|
302
|
+
- ✅ Open Graph tags for rich social media previews
|
|
303
|
+
- ✅ Twitter Card support
|
|
304
|
+
- ✅ PWA manifest for "Add to Home Screen"
|
|
305
|
+
- ✅ Sitemap and robots.txt
|
|
306
|
+
- ✅ Semantic HTML with proper meta tags
|
|
307
|
+
|
|
308
|
+
## 🌟 Keywords
|
|
309
|
+
|
|
310
|
+
`oh my posh`, `terminal customization`, `shell prompt`, `powerline`, `prompt theme`, `terminal theme`, `powershell prompt`, `zsh theme`, `bash prompt`, `terminal configurator`, `visual editor`, `drag and drop`, `oh-my-posh builder`, `prompt generator`
|
|
311
|
+
|
|
312
|
+
## 📚 Documentation
|
|
313
|
+
|
|
314
|
+
### User Documentation
|
|
315
|
+
- [Oh My Posh Documentation](https://ohmyposh.dev/docs/)
|
|
316
|
+
- [Configuration Overview](https://ohmyposh.dev/docs/configuration/overview)
|
|
317
|
+
- [Segment Reference](https://ohmyposh.dev/docs/configuration/segment)
|
|
318
|
+
- [Template Syntax](https://ohmyposh.dev/docs/configuration/templates)
|
|
319
|
+
|
|
320
|
+
### Developer Documentation
|
|
321
|
+
- [CONTRIBUTING.md](CONTRIBUTING.md) - How to contribute themes and code
|
|
322
|
+
- [docs/architecture.md](docs/architecture.md) - Complete architecture and technical overview
|
|
323
|
+
- [docs/quick-reference.md](docs/quick-reference.md) - Quick reference for config structure
|
|
324
|
+
- [docs/config-migration-guide.md](docs/config-migration-guide.md) - Migrate old config format
|
|
325
|
+
- [docs/segment-json-migration.md](docs/segment-json-migration.md) - Segment refactoring details
|
|
326
|
+
- [docs/nerd-font-icons-reference.md](docs/nerd-font-icons-reference.md) - 200+ Nerd Font icons
|
|
327
|
+
- [docs/config-structure-update-summary.md](docs/config-structure-update-summary.md) - Config structure changes
|
|
328
|
+
- [public/segments/README.md](public/segments/README.md) - How to add new segments
|
|
329
|
+
- [scripts/README.md](scripts/README.md) - Validation scripts documentation
|
|
330
|
+
|
|
331
|
+
## Contributing
|
|
332
|
+
|
|
333
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
334
|
+
|
|
335
|
+
## License
|
|
336
|
+
|
|
337
|
+
This project is open source and available under the [MIT License](LICENSE).
|
|
338
|
+
|
|
339
|
+
## Acknowledgments
|
|
340
|
+
|
|
341
|
+
- [Oh My Posh](https://github.com/JanDeDobbeleer/oh-my-posh) by Jan De Dobbeleer
|
|
342
|
+
- All the Oh My Posh contributors and community
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
# Community Configurations
|
|
2
|
+
|
|
3
|
+
This directory contains community-contributed Oh My Posh configurations.
|
|
4
|
+
|
|
5
|
+
## Submission Guidelines
|
|
6
|
+
|
|
7
|
+
To submit your configuration:
|
|
8
|
+
|
|
9
|
+
1. Create a new JSON file in this directory with **only** the Oh My Posh configuration (no metadata wrapper)
|
|
10
|
+
2. Update `manifest.json` to include your configuration's metadata
|
|
11
|
+
3. Submit a pull request using the provided template
|
|
12
|
+
|
|
13
|
+
For detailed instructions, see [CONTRIBUTING.md](../../CONTRIBUTING.md)
|
|
14
|
+
|
|
15
|
+
## File Structure
|
|
16
|
+
|
|
17
|
+
**Config Files** (`your-theme-name.json`):
|
|
18
|
+
- Contains **ONLY** the Oh My Posh configuration
|
|
19
|
+
- Should start with `$schema` and include `blocks`
|
|
20
|
+
- **Do NOT include** `id`, `name`, `description`, `author`, or `tags` in the config file
|
|
21
|
+
|
|
22
|
+
**Manifest File** (`manifest.json`):
|
|
23
|
+
- Contains metadata for all community configs
|
|
24
|
+
- Each entry includes: `id`, `name`, `description`, `icon`, `author`, `tags`, and `file`
|
|
25
|
+
|
|
26
|
+
Example config file structure:
|
|
27
|
+
```json
|
|
28
|
+
{
|
|
29
|
+
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
30
|
+
"version": 4,
|
|
31
|
+
"final_space": true,
|
|
32
|
+
"blocks": [
|
|
33
|
+
{
|
|
34
|
+
"type": "prompt",
|
|
35
|
+
"alignment": "left",
|
|
36
|
+
"segments": [
|
|
37
|
+
// Your segments here
|
|
38
|
+
]
|
|
39
|
+
}
|
|
40
|
+
]
|
|
41
|
+
}
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## File Naming
|
|
45
|
+
|
|
46
|
+
- Use lowercase with hyphens: `my-theme-name.json`
|
|
47
|
+
- Be descriptive but concise
|
|
48
|
+
- Avoid special characters
|
|
49
|
+
|
|
50
|
+
## Quality Standards
|
|
51
|
+
|
|
52
|
+
All community configurations should:
|
|
53
|
+
- Contain **ONLY** the Oh My Posh configuration (no metadata wrapper)
|
|
54
|
+
- Follow the Oh My Posh schema with valid `$schema` URL
|
|
55
|
+
- Include at least one block with segments
|
|
56
|
+
- Have metadata properly defined in `manifest.json`
|
|
57
|
+
- Be tested and working
|
|
58
|
+
- Be your original work or properly attributed
|
|
59
|
+
|
|
60
|
+
## Examples
|
|
61
|
+
|
|
62
|
+
See the `samples/` directory for examples of properly formatted configurations.
|
|
63
|
+
|
|
64
|
+
## Questions?
|
|
65
|
+
|
|
66
|
+
Check out [CONTRIBUTING.md](../../CONTRIBUTING.md) or open a discussion on GitHub.
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
3
|
+
"version": 4,
|
|
4
|
+
"palette": {
|
|
5
|
+
"text-light": "#ffffff",
|
|
6
|
+
"session": "#ffbebc",
|
|
7
|
+
"session-icon": "#ff70a6",
|
|
8
|
+
"time": "#bc93ff",
|
|
9
|
+
"winget": "#70e2ff",
|
|
10
|
+
"git": "#ee79d1",
|
|
11
|
+
"path-icon": "#00c7fc",
|
|
12
|
+
"path": "#ffafd2",
|
|
13
|
+
"prompt-ok": "#A9FFB4",
|
|
14
|
+
"prompt-error": "#ef5350",
|
|
15
|
+
"transient": "#FEF5ED"
|
|
16
|
+
},
|
|
17
|
+
"blocks": [
|
|
18
|
+
{
|
|
19
|
+
"alignment": "left",
|
|
20
|
+
"newline": true,
|
|
21
|
+
"segments": [
|
|
22
|
+
{
|
|
23
|
+
"foreground": "p:session",
|
|
24
|
+
"leading_diamond": "<p:session-icon> \ue200 </>",
|
|
25
|
+
"options": {
|
|
26
|
+
"display_host": true
|
|
27
|
+
},
|
|
28
|
+
"style": "diamond",
|
|
29
|
+
"template": "{{ .UserName }} <p:text-light>on</>",
|
|
30
|
+
"type": "session"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"foreground": "p:time",
|
|
34
|
+
"options": {
|
|
35
|
+
"time_format": "Monday <p:text-light>at</> 3:04 PM"
|
|
36
|
+
},
|
|
37
|
+
"style": "diamond",
|
|
38
|
+
"template": " {{ .CurrentDate | date .Format }} ",
|
|
39
|
+
"type": "time"
|
|
40
|
+
},
|
|
41
|
+
{
|
|
42
|
+
"type": "winget",
|
|
43
|
+
"style": "plain",
|
|
44
|
+
"foreground": "p:winget",
|
|
45
|
+
"template": " \uf409 {{ .UpdateCount }} ",
|
|
46
|
+
"options": {
|
|
47
|
+
"cache_duration": "5m"
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"foreground": "p:git",
|
|
52
|
+
"options": {
|
|
53
|
+
"branch_icon": " \uf126 ",
|
|
54
|
+
"fetch_status": true,
|
|
55
|
+
"fetch_upstream_icon": true,
|
|
56
|
+
"fetch_worktree_count": true
|
|
57
|
+
},
|
|
58
|
+
"style": "diamond",
|
|
59
|
+
"template": " {{ .UpstreamIcon }}{{ .HEAD }}{{if .BranchStatus }} {{ .BranchStatus }}{{ end }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if and (.Working.Changed) (.Staging.Changed) }} |{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }}{{ if gt .StashCount 0 }} \ueb4b {{ .StashCount }}{{ end }} ",
|
|
60
|
+
"type": "git"
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"type": "prompt"
|
|
64
|
+
},
|
|
65
|
+
{
|
|
66
|
+
"alignment": "right",
|
|
67
|
+
"segments": [
|
|
68
|
+
{
|
|
69
|
+
"foreground": "p:prompt-ok",
|
|
70
|
+
"style": "plain",
|
|
71
|
+
"type": "text"
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"options": {
|
|
75
|
+
"root_icon": "\uf292 "
|
|
76
|
+
},
|
|
77
|
+
"style": "diamond",
|
|
78
|
+
"template": " \uf0e7 ",
|
|
79
|
+
"type": "root"
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
"type": "copilot",
|
|
83
|
+
"style": "plain",
|
|
84
|
+
"template": " \uec1e {{ .Premium.Percent.Gauge }} ",
|
|
85
|
+
"cache": {
|
|
86
|
+
"duration": "5m",
|
|
87
|
+
"strategy": "session"
|
|
88
|
+
},
|
|
89
|
+
"options": {
|
|
90
|
+
"http_timeout": 1000
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
],
|
|
94
|
+
"type": "prompt"
|
|
95
|
+
},
|
|
96
|
+
{
|
|
97
|
+
"alignment": "left",
|
|
98
|
+
"newline": true,
|
|
99
|
+
"segments": [
|
|
100
|
+
{
|
|
101
|
+
"foreground": "p:path",
|
|
102
|
+
"leading_diamond": "<p:path-icon> \ue285 </><p:path>{</>",
|
|
103
|
+
"options": {
|
|
104
|
+
"folder_icon": "\uf07b",
|
|
105
|
+
"folder_separator_icon": " \uebcb ",
|
|
106
|
+
"home_icon": "home",
|
|
107
|
+
"style": "agnoster_full"
|
|
108
|
+
},
|
|
109
|
+
"style": "diamond",
|
|
110
|
+
"template": " \ue5ff {{ .Path }} ",
|
|
111
|
+
"trailing_diamond": "<p:path>}</>",
|
|
112
|
+
"type": "path"
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"foreground": "p:prompt-ok",
|
|
116
|
+
"foreground_templates": [
|
|
117
|
+
"{{ if gt .Code 0 }}p:prompt-error{{ end }}"
|
|
118
|
+
],
|
|
119
|
+
"options": {
|
|
120
|
+
"always_enabled": true
|
|
121
|
+
},
|
|
122
|
+
"style": "plain",
|
|
123
|
+
"template": " \ueb05 ",
|
|
124
|
+
"type": "status"
|
|
125
|
+
}
|
|
126
|
+
],
|
|
127
|
+
"type": "prompt"
|
|
128
|
+
}
|
|
129
|
+
],
|
|
130
|
+
"console_title_template": "{{ .Folder }}",
|
|
131
|
+
"transient_prompt": {
|
|
132
|
+
"background": "transparent",
|
|
133
|
+
"foreground": "p:transient",
|
|
134
|
+
"template": "\ue285 "
|
|
135
|
+
}
|
|
136
|
+
}
|
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
|
|
3
|
+
"version": 4,
|
|
4
|
+
"final_space": true,
|
|
5
|
+
"palette": {
|
|
6
|
+
"text-light": "#ffffff",
|
|
7
|
+
"text-dark": "#000000",
|
|
8
|
+
"azure-bg": "#0078d4",
|
|
9
|
+
"dotnet-bg": "#512bd4",
|
|
10
|
+
"git-bg": "#16c60c",
|
|
11
|
+
"git-modified-bg": "#ffca00",
|
|
12
|
+
"azfunc-bg": "#ffd800",
|
|
13
|
+
"docker-bg": "#0db7ed",
|
|
14
|
+
"exectime-bg": "#8a3ffc",
|
|
15
|
+
"prompt-ok": "#16c60c",
|
|
16
|
+
"prompt-error": "#e81123"
|
|
17
|
+
},
|
|
18
|
+
"blocks": [
|
|
19
|
+
{
|
|
20
|
+
"type": "prompt",
|
|
21
|
+
"alignment": "left",
|
|
22
|
+
"segments": [
|
|
23
|
+
{
|
|
24
|
+
"type": "session",
|
|
25
|
+
"style": "diamond",
|
|
26
|
+
"foreground": "p:text-light",
|
|
27
|
+
"background": "p:azure-bg",
|
|
28
|
+
"leading_diamond": "\ue0b6",
|
|
29
|
+
"trailing_diamond": "\ue0b0",
|
|
30
|
+
"template": " \uf2bd {{ .UserName }} "
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"type": "path",
|
|
34
|
+
"style": "powerline",
|
|
35
|
+
"powerline_symbol": "\ue0b0",
|
|
36
|
+
"foreground": "p:text-light",
|
|
37
|
+
"background": "p:dotnet-bg",
|
|
38
|
+
"template": " \uf07c {{ .Path }} ",
|
|
39
|
+
"options": {
|
|
40
|
+
"style": "folder",
|
|
41
|
+
"max_depth": 3
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"type": "git",
|
|
46
|
+
"style": "powerline",
|
|
47
|
+
"powerline_symbol": "\ue0b0",
|
|
48
|
+
"foreground": "p:text-light",
|
|
49
|
+
"background": "p:git-bg",
|
|
50
|
+
"foreground_templates": [
|
|
51
|
+
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:text-dark{{ end }}"
|
|
52
|
+
],
|
|
53
|
+
"background_templates": [
|
|
54
|
+
"{{ if or (.Working.Changed) (.Staging.Changed) }}p:git-modified-bg{{ end }}"
|
|
55
|
+
],
|
|
56
|
+
"template": " \uf126 {{ .HEAD }}{{ if .Working.Changed }} \uf044 {{ .Working.String }}{{ end }}{{ if .Staging.Changed }} \uf046 {{ .Staging.String }}{{ end }} ",
|
|
57
|
+
"options": {
|
|
58
|
+
"fetch_status": true
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
{
|
|
62
|
+
"type": "dotnet",
|
|
63
|
+
"style": "powerline",
|
|
64
|
+
"powerline_symbol": "\ue0b0",
|
|
65
|
+
"foreground": "p:text-light",
|
|
66
|
+
"background": "p:dotnet-bg",
|
|
67
|
+
"template": " \ue77f {{ .Full }} "
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
"type": "azfunc",
|
|
71
|
+
"style": "powerline",
|
|
72
|
+
"powerline_symbol": "\ue0b0",
|
|
73
|
+
"foreground": "p:text-light",
|
|
74
|
+
"background": "p:azfunc-bg",
|
|
75
|
+
"template": " \uf0e7 {{ .Full }} "
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"type": "az",
|
|
79
|
+
"style": "powerline",
|
|
80
|
+
"powerline_symbol": "\ue0b0",
|
|
81
|
+
"foreground": "p:text-light",
|
|
82
|
+
"background": "p:azure-bg",
|
|
83
|
+
"template": " \uebd8 {{ .EnvironmentName }} "
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
"type": "docker",
|
|
87
|
+
"style": "powerline",
|
|
88
|
+
"powerline_symbol": "\ue0b0",
|
|
89
|
+
"foreground": "p:text-light",
|
|
90
|
+
"background": "p:docker-bg",
|
|
91
|
+
"template": " \uf308 {{ .Context }} "
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
},
|
|
95
|
+
{
|
|
96
|
+
"type": "prompt",
|
|
97
|
+
"alignment": "right",
|
|
98
|
+
"segments": [
|
|
99
|
+
{
|
|
100
|
+
"type": "executiontime",
|
|
101
|
+
"style": "diamond",
|
|
102
|
+
"foreground": "p:text-light",
|
|
103
|
+
"background": "p:exectime-bg",
|
|
104
|
+
"leading_diamond": "\ue0b2",
|
|
105
|
+
"trailing_diamond": "\ue0b4",
|
|
106
|
+
"template": " \uf252 {{ .FormattedMs }} ",
|
|
107
|
+
"options": {
|
|
108
|
+
"threshold": 500,
|
|
109
|
+
"style": "roundrock"
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
]
|
|
113
|
+
},
|
|
114
|
+
{
|
|
115
|
+
"type": "prompt",
|
|
116
|
+
"alignment": "left",
|
|
117
|
+
"newline": true,
|
|
118
|
+
"segments": [
|
|
119
|
+
{
|
|
120
|
+
"type": "status",
|
|
121
|
+
"style": "plain",
|
|
122
|
+
"foreground": "p:prompt-ok",
|
|
123
|
+
"foreground_templates": [
|
|
124
|
+
"{{ if gt .Code 0 }}p:prompt-error{{ end }}"
|
|
125
|
+
],
|
|
126
|
+
"template": "\u276f ",
|
|
127
|
+
"options": {
|
|
128
|
+
"always_enabled": true
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
]
|
|
132
|
+
}
|
|
133
|
+
]
|
|
134
|
+
}
|