Overview
Themes control the visual density, layout, and information presentation of your statusline. Currently, cc-statusline supports three theme modes:minimal, detailed, and compact.
Theme Configuration
Themes are defined in theStatuslineConfig interface (prompts.ts:7):
'detailed' (hardcoded in prompts.ts:73)
Note: Theme selection is not currently exposed in the interactive prompts. The theme is automatically set to detailed during configuration.
Available Themes
Detailed Theme (Default)
Layout: Full 3-line layout with all information and progress barsFeatures:Use Case: Maximum information density with visual aidsPerformance: ~45-80ms execution time
- Complete information display
- Progress bars for context and session
- Color-coded sections
- Emoji indicators
Minimal Theme
Layout: Reduced visual elements, no progress barsFeatures:Use Case: Clean, distraction-free display with essential informationPerformance: Slightly faster than detailed (~40-70ms)
- Text-only percentages and values
- No progress bars (
bash-generator.ts:23) - Color support if enabled
- Emoji indicators
- Session progress bar hidden:
showProgressBar: config.theme !== 'minimal' - More compact vertical space
Compact Theme
Layout: Condensed git informationFeatures:Use Case: When git information should be more conciseNote: As of v1.4.0, delta changes are disabled for all themes, so compact mode has minimal visible difference.
- Same overall layout as detailed
- Compact git display mode (
bash-generator.ts:31) - All other features identical to detailed
Theme Implementation
Themes are applied during bash script generation inbash-generator.ts:9-62:
Theme Effects by Feature
Progress Bars
Minimal theme disables session progress bars:- Detailed:
[========--]shown for session and context - Compact:
[========--]shown for session and context - Minimal: No session progress bar, percentage only
Git Display
Compact theme enables condensed git mode:generateGitBashCode() in the git feature module.
Color Support
All themes support colors whencolors: true is configured:
Theme Metadata
The selected theme is embedded in the generated script header (bash-generator.ts:37):
Changing Themes
Currently, themes cannot be selected during interactive setup. To use a different theme: Option 1: Modify the default in source codePerformance Comparison
| Theme | Avg Execution | Memory | Features |
|---|---|---|---|
| Detailed | 45-80ms | ~2MB | Full info + progress bars |
| Minimal | 40-70ms | ~2MB | Text only, no progress bars |
| Compact | 45-80ms | ~2MB | Condensed git display |
Color Themes
Thetheme parameter is also passed to generateColorBashCode() (bash-generator.ts:49):
Layout Structure
All themes follow the same 3-line structure (frombash-generator.ts:214-293):
Line 1: Core information
Related
- Configuration Options - Theme config parameter
- Feature Flags - Features affected by themes
- Init Command - Setting up your statusline