Skip to content

๐Ÿ’Ž Prompt โ€” full referenceโžœ

A 3-line cobalt + magenta starship prompt with right-aligned battery + clock. Every segment is contextual: it only shows when it has something useful to say.

Rich starship prompt

Failure state

Anatomyโžœ

# Line 1 (left format)                                  + right_format
โ•ญโ”€  ~/Code/dotfiles   on   main !8 ?15           ๐Ÿณ   [bat]  [time]
   โ”‚                  โ”‚    โ”‚                      โ”‚      โ”‚     โ”‚
   โ”‚                  โ”‚    โ”‚                      โ”‚      โ”‚     โ””โ”€ time
   โ”‚                  โ”‚    โ”‚                      โ”‚      โ””โ”€ battery
   โ”‚                  โ”‚    โ”‚                      โ””โ”€ colima (๐Ÿณ if running)
   โ”‚                  โ”‚    โ””โ”€ git_branch + status
   โ”‚                  โ””โ”€ "on" literal
   โ””โ”€ directory

# Line 2
โ”‚  โŽˆ docker-desktop (default)   3.12.1 (venv)  took 4s
โ”‚   โ”‚                          โ”‚              โ”‚
โ”‚   โ”‚                          โ”‚              โ””โ”€ cmd_duration
โ”‚   โ”‚                          โ””โ”€ python
โ”‚   โ””โ”€ kubernetes

# Line 3
โ•ฐโ”€โฏ
   โ””โ”€ character

Segment reference & togglesโžœ

โœ… Active segmentsโžœ

Segment Trigger Visual Disable
directory always cobalt path, truncated to 4 components remove $directory from format
git_branch inside any git repo magenta <branch> [git_branch] disabled = true
git_status dirty repo !N modified, +N staged, ?N untracked, โ‡กN/โ‡ฃN ahead/behind [git_status] disabled = true
kubernetes dir contains k8s/ or Chart.yaml cyan โŽˆ <ctx> (<ns>) [kubernetes] disabled = true
azure logged into az cli bold cobalt ๓ฐ … <subscription> [azure] disabled = true
python python project markers green <ver> (<venv>) [python] disabled = true
cmd_duration last cmd > 2s amber took 4s [cmd_duration] min_time = 99999999
character always cobalt โฏ / magenta โœ— โฏ / green โฎ (vim) always required
battery macOS / laptops colour-coded percent [battery] disabled = true
time always grey HH:MM [time] disabled = true
custom.colima colima VM running green ๐Ÿณ [custom.colima] disabled = true

๐ŸŸก Pre-configured but dormant (flip disabled and add to format)โžœ

nodejs ยท golang ยท terraform ยท username ยท hostname

๐Ÿ”ด Off-by-defaultโžœ

aws ยท gcloud ยท docker_context ยท package ยท jobs ยท memory_usage ยท os ยท shell ยท 50+ language modules

Full list: https://starship.rs/config/

Adding / removing segmentsโžœ

The format field in zsh/starship.toml controls what renders and where:

format = """
[โ•ญโ”€](grey) $directory$git_branch$git_status${custom.colima}
[โ”‚ ](grey)$kubernetes$azure$python$cmd_duration
[โ•ฐโ”€](grey)$character"""

right_format = """$battery$time"""

Add a segment by inserting $<name> (or ${custom.<name>} for custom modules) in the desired position. Remove by deleting it. Changes take effect on next shell.

Recipesโžœ

Hide the time / battery
right_format = ""               # remove both
right_format = """$battery"""   # keep battery only
Make it a one-line prompt
format = """$directory$git_branch$git_status$kubernetes$azure$python$cmd_duration$character"""
Always show full directory (no truncation)
[directory]
truncation_length = 0
truncate_to_repo = false
Show k8s context everywhere (not just in k8s dirs)
[kubernetes]
detect_files = []
detect_folders = []
Add Go version when in a Go project
[โ”‚ ](grey)$kubernetes$azure$golang$python$cmd_duration
Add AWS profile / region

[aws]
disabled = false
format = "[ $symbol($profile)(@$region)]($style) "
symbol = " "
style  = "bold amber"
Then [โ”‚ ](grey)$kubernetes$azure$aws$python$cmd_duration in format.

Make slow commands warn loudly
[cmd_duration]
min_time = 500
format   = "[took $duration โš ]($style) "
style    = "bold red"
Disable starship entirely (back to oh-my-zsh)

Comment out eval "$(starship init zsh)" in ~/.zshrc.