Skip to content

Development

Brei0x 🦅 edited this page Mar 10, 2026 · 1 revision

Development

Architecture

The configuration follows Starship's module system with a custom format string defining segment order and styling:

  • Line 1 Left: OS → Username → Directory → Git → Languages → Hostname → Duration
  • Line 1 Right: Memory → Time
  • Line 2: Character prompt (success/error/vim modes)

Segments are connected using powerline-style separators (/). All colors reference the brei0x palette defined at the bottom of starship.toml.

Validation

The project uses taplo for TOML validation and formatting.

Install taplo

macOS
brew install taplo
Linux
# Via cargo
cargo install taplo-cli --locked

# Or via the install script
curl -fsSL https://github.com/tamasfe/taplo/releases/latest/download/taplo-linux-x86_64.gz \
  | gzip -d - | install -m 755 /dev/stdin /usr/local/bin/taplo
Windows
# Via Scoop
scoop install taplo

# Or via cargo
cargo install taplo-cli --locked

Validate and format

The taplo commands are identical on all platforms:

# Validate TOML syntax
taplo check starship.toml

# Check formatting (dry-run)
taplo fmt --check starship.toml

# Auto-format
taplo fmt starship.toml

Validate with Starship directly

macOS / Linux:

STARSHIP_CONFIG=./starship.toml starship print-config --default false

Windows (PowerShell):

$env:STARSHIP_CONFIG = "./starship.toml"
starship print-config --default false

Check markdown links

lychee '**/*.md'

Key configuration sections

Section Purpose
format Main prompt structure — defines segment order
[os.symbols] 40+ OS icons (requires Nerd Font)
[directory.substitutions] Folder icons for common directories
[palettes.brei0x] 8-color theme palette
Language modules ([c], [rust], etc.) All follow the same format pattern

Contributing

  1. Fork the repository
  2. Make your changes to starship.toml
  3. Run taplo check starship.toml to validate
  4. Run taplo fmt starship.toml to format
  5. Open a pull request with a description of your changes

Clone this wiki locally