Skip to main content

Starship on Zsh

Starship Configuration
#

Since powerlevel10k is now at its end of life, I decided to set up a configuration with Starship, which seems promising in terms of performance and customization. You can check out the official Starship site for more information.

To install Starship, you can run:

curl -sS https://starship.rs/install.sh | sh

Next, initialize Starship in the .zshrc:

eval "$(starship init zsh)"
export STARSHIP_CONFIG=~/.config/starship/starship.toml

Configuration
#

The configuration is quite straightforward. There’s a format global variable that defines the overall look of the prompt. In my case, I decided to try out the new feature that allows setting the prompt on the right side:

format defines the left part of the prompt:

  • format = “”"$directory$character"""

right_format defines the right side of the prompt:

  • right_format = “”"$all"""

Then, you can define the global palette by selecting from pre-existing presets,(here)

  • palette = “gruvbox_dark”

Each module has a format option to customize its appearance in the prompt. For example, here’s how to customize the AWS module:

[aws]
format = '[$symbol(profile: "$profile" )(\(region: $region\) )]($style)'
disabled = false
style = 'bold blue'
symbol = " "

In this example, the style is referenced within the format using $style. Every variable starts with a dollar sign ($), making the configuration flexible and highly customizable. For the full configuration: Starship Configuration

There are no articles to list here yet.