diff options
author | Matan Kushner <hello@matchai.dev> | 2021-01-03 03:56:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-03 09:56:07 +0100 |
commit | 4cb8b1f0e891082ae1bed58f6448f3f8df21d35c (patch) | |
tree | 1359d3b0a25bc634e23cf1f4b5cac9fd44cad2e2 /docs/pl-PL | |
parent | cfff77043e95df8b02b9f3242e42b87d0d94249a (diff) |
docs(i18n): New Crowdin updates (#1941)
* New translations README.md (Spanish)
* New translations README.md (Spanish)
* New translations README.md (Spanish)
* New translations README.md (Spanish)
* New translations README.md (French)
* New translations README.md (Italian)
* New translations README.md (Arabic)
* New translations README.md (Korean)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (Russian)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (Spanish)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Traditional)
* New translations README.md (Spanish)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Arabic)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (Spanish)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Arabic)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (Spanish)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Arabic)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (Spanish)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Arabic)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Dutch)
* New translations README.md (Polish)
* New translations README.md (French)
* New translations README.md (Spanish)
* New translations README.md (German)
* New translations README.md (Japanese)
* New translations README.md (Russian)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Traditional)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Turkish)
* New translations README.md (Russian)
* New translations README.md (Russian)
* New translations README.md (Russian)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Arabic)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (Spanish)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (German)
* New translations README.md (German)
* New translations README.md (German)
* New translations README.md (German)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Arabic)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (Spanish)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Italian)
* New translations README.md (French)
* New translations README.md (Spanish)
* New translations README.md (Arabic)
* New translations README.md (German)
* New translations README.md (Japanese)
* New translations README.md (Korean)
* New translations README.md (Dutch)
* New translations README.md (Polish)
* New translations README.md (Portuguese)
* New translations README.md (Russian)
* New translations README.md (Turkish)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Traditional)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Arabic)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (French)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (Spanish)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (German)
* New translations README.md (Japanese)
* New translations README.md (Portuguese)
* New translations README.md (Spanish)
* New translations README.md (French)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Russian)
* New translations README.md (Arabic)
* New translations README.md (Italian)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Korean)
* New translations README.md (Dutch)
* New translations README.md (German)
* New translations README.md (Japanese)
* New translations README.md (Portuguese)
* New translations README.md (Spanish)
* New translations README.md (French)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Russian)
* New translations README.md (Arabic)
* New translations README.md (Italian)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Korean)
* New translations README.md (Dutch)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (German)
* New translations README.md (Japanese)
* New translations README.md (Portuguese)
* New translations README.md (Spanish)
* New translations README.md (French)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Russian)
* New translations README.md (Arabic)
* New translations README.md (Italian)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Korean)
* New translations README.md (Dutch)
* New translations README.md (Chinese Simplified)
* New translations README.md (Russian)
* New translations README.md (Russian)
* New translations README.md (Portuguese)
* New translations README.md (Portuguese)
* New translations README.md (Japanese)
* New translations README.md (Japanese)
* New translations README.md (German)
* New translations README.md (German)
* New translations README.md (Chinese Simplified)
* New translations README.md (Chinese Traditional)
* New translations README.md (Spanish)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Arabic)
* New translations README.md (Korean)
* New translations README.md (Italian)
* New translations README.md (Italian)
* New translations README.md (Korean)
* New translations README.md (Arabic)
* New translations README.md (Spanish)
* New translations README.md (Turkish)
* New translations README.md (French)
* New translations README.md (French)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Polish)
* New translations README.md (Dutch)
* New translations README.md (Dutch)
* New translations README.md (German)
* New translations README.md (Japanese)
* New translations README.md (Portuguese)
* New translations README.md (Spanish)
* New translations README.md (French)
* New translations README.md (Portuguese, Brazilian)
* New translations README.md (Chinese Traditional)
* New translations README.md (Chinese Simplified)
* New translations README.md (Russian)
* New translations README.md (Arabic)
* New translations README.md (Italian)
* New translations README.md (Turkish)
* New translations README.md (Polish)
* New translations README.md (Korean)
* New translations README.md (Dutch)
Diffstat (limited to 'docs/pl-PL')
-rw-r--r-- | docs/pl-PL/README.md | 112 | ||||
-rw-r--r-- | docs/pl-PL/advanced-config/README.md | 93 | ||||
-rw-r--r-- | docs/pl-PL/config/README.md | 2503 | ||||
-rw-r--r-- | docs/pl-PL/faq/README.md | 92 | ||||
-rw-r--r-- | docs/pl-PL/guide/README.md | 272 | ||||
-rw-r--r-- | docs/pl-PL/migrating-to-0.45.0/README.md | 267 | ||||
-rw-r--r-- | docs/pl-PL/presets/README.md | 89 |
7 files changed, 3428 insertions, 0 deletions
diff --git a/docs/pl-PL/README.md b/docs/pl-PL/README.md new file mode 100644 index 000000000..4767ca0b1 --- /dev/null +++ b/docs/pl-PL/README.md @@ -0,0 +1,112 @@ +--- +home: true +heroImage: /logo.svg +heroText: +tagline: The minimal, blazing-fast, and infinitely customizable prompt for any shell! +actionText: Get Started → +actionLink: ./guide/ +features: + - + title: Compatibility First + details: Works on the most common shells on the most common operating systems. Use it everywhere! + - + title: Rust-Powered + details: Brings the best-in-class speed and safety of Rust, to make your prompt as quick and reliable as possible. + - + title: Customizable + details: Every little detail is customizable to your liking, to make this prompt as minimal or feature-rich as you'd like it to be. +footer: ISC Licensed | Copyright © 2019-present Starship Contributors +#Used for the description meta tag, for SEO +metaTitle: "Starship: Cross-Shell Prompt" +description: Starship is the minimal, blazing fast, and extremely customizable prompt for any shell! Shows the information you need, while staying sleek and minimal. Quick installation available for Bash, Fish, ZSH, Ion, and PowerShell. +--- + +<div class="center"> + <video class="demo-video" muted autoplay loop playsinline> + <source src="/demo.webm" type="video/webm"> + <source src="/demo.mp4" type="video/mp4"> + </video> +</div> + +### Quick Install + +1. Install the **starship** binary: + + + #### Install Latest Version + + With Shell: + + ```sh + curl -fsSL https://starship.rs/install.sh | bash + ``` + + + #### Install via Package Manager + + With [Homebrew](https://brew.sh/): + + ```sh + brew install starship + ``` + + With [Scoop](https://scoop.sh): + + ```powershell + scoop install starship + ``` + +1. Add the init script to your shell's config file: + + + #### Bash + + Add the following to the end of `~/.bashrc`: + + ```sh + # ~/.bashrc + + eval "$(starship init bash)" + ``` + + + #### Fish + + Add the following to the end of `~/.config/fish/config.fish`: + + ```sh + # ~/.config/fish/config.fish + + starship init fish | source + ``` + + + #### Zsh + + Add the following to the end of `~/.zshrc`: + + ```sh + # ~/.zshrc + + eval "$(starship init zsh)" + ``` + + + #### Powershell + + Add the following to the end of `Microsoft.PowerShell_profile.ps1`. You can check the location of this file by querying the `$PROFILE` variable in PowerShell. Typically the path is `~\Documents\PowerShell\Microsoft.PowerShell_profile.ps1` or `~/.config/powershell/Microsoft.PowerShell_profile.ps1` on -Nix. + + ```sh + Invoke-Expression (&starship init powershell) + ``` + + + #### Ion + + Add the following to the end of `~/.config/ion/initrc`: + + ```sh + # ~/.config/ion/initrc + + eval $(starship init ion) + ``` diff --git a/docs/pl-PL/advanced-config/README.md b/docs/pl-PL/advanced-config/README.md new file mode 100644 index 000000000..1cf6ebb78 --- /dev/null +++ b/docs/pl-PL/advanced-config/README.md @@ -0,0 +1,93 @@ +# Advanced Configuration + +While Starship is a versatile shell, sometimes you need to do more than edit `starship.toml` to get it to do certain things. This page details some of the more advanced configuration techniques used in starship. + +::: warning + +The configurations in this section are subject to change in future releases of Starship. + +::: + +## Custom pre-prompt and pre-execution Commands in Bash + +Bash does not have a formal preexec/precmd framework like most other shells. Because of this, it is difficult to provide fully customizable hooks in `bash`. However, Starship does give you limited ability to insert your own functions into the prompt-rendering procedure: + +- To run a custom function right before the prompt is drawn, define a new function and then assign its name to `starship_precmd_user_func`. For example, to draw a rocket before the prompt, you would do + +```bash +function blastoff(){ + echo "🚀" +} +starship_precmd_user_func="blastoff" +``` + +- To run a custom function right before a command runs, you can use the [`DEBUG` trap mechanism](https://jichu4n.com/posts/debug-trap-and-prompt_command-in-bash/). However, you **must** trap the DEBUG signal *before* initializing Starship! Starship can preserve the value of the DEBUG trap, but if the trap is overwritten after starship starts up, some functionality will break. + +```bash +function blastoff(){ + echo "🚀" +} +trap blastoff DEBUG # Trap DEBUG *before* running starship +eval $(starship init bash) +``` + +## Change Window Title + +Some shell prompts will automatically change the window title for you (e.g. to reflect your working directory). Fish even does it by default. Starship does not do this, but it's fairly straightforward to add this functionality to `bash` or `zsh`. + +First, define a window title change function (identical in bash and zsh): + +```bash +function set_win_title(){ + echo -ne "\033]0; YOUR_WINDOW_TITLE_HERE \007" +} +``` + +You can use variables to customize this title (`$USER`, `$HOSTNAME`, and `$PWD` are popular choices). + +In `bash`, set this function to be the precmd starship function: + +```bash +starship_precmd_user_func="set_win_title" +``` + +In `zsh`, add this to the `precmd_functions` array: + +```bash +precmd_functions+=(set_win_title) +``` + +If you like the result, add these lines to your shell configuration file (`~/.bashrc` or `~/.zshrc`) to make it permanent. + +For example, if you want to display your current directory in your terminal tab title, add the following snippet to your `~/.bashrc` or `~/.zshrc`: + +```bash +function set_win_title(){ + echo -ne "\033]0; $(basename $PWD) \007" +} +starship_precmd_user_func="set_win_title" +``` + +## Style Strings + +Style strings are a list of words, separated by whitespace. The words are not case sensitive (i.e. `bold` and `BoLd` are considered the same string). Each word can be one of the following: + + - `bold` + - `underline` + - `dimmed` + - `bg:<color>` + - `fg:<color>` + - `<color>` + - `none` + +where `<color>` is a color specifier (discussed below). `fg:<color>` and `<color>` currently do the same thing , though this may change in the future. The order of words in the string does not matter. + +The `none` token overrides all other tokens in a string if it is not part of a `bg:` specifier, so that e.g. `fg:red none fg:blue` will still create a string with no styling. `bg:none` sets the background to the default color so `fg:red bg:none` is equivalent to `red` or `fg:red` and `bg:green fg:red bg:none` is also equivalent to `fg:red` or `red`. It may become an error to use `none` in conjunction with other tokens in the future. + +A color specifier can be one of the following: + + - One of the standard terminal colors: `black`, `red`, `green`, `blue`, `yellow`, `purple`, `cyan`, `white`. You can optionally prefix these with `bright-` to get the bright version (e.g. `bright-white`). + - A `#` followed by a six-digit hexadecimal number. This specifies an [RGB color hex code](https://www.w3schools.com/colors/colors_hexadecimal.asp). + - A number between 0-255. This specifies an [8-bit ANSI Color Code](https://i.stack.imgur.com/KTSQa.png). + +If multiple colors are specified for foreground/background, the last one in the string will take priority. diff --git a/docs/pl-PL/config/README.md b/docs/pl-PL/config/README.md new file mode 100644 index 000000000..286375e20 --- /dev/null +++ b/docs/pl-PL/config/README.md @@ -0,0 +1,2503 @@ +# Configuration + +To get started configuring starship, create the following file: `~/.config/starship.toml`. + +```sh +mkdir -p ~/.config && touch ~/.config/starship.toml +``` + +All configuration for starship is done in this [TOML](https://github.com/toml-lang/toml) file: + +```toml +# Don't print a new line at the start of the prompt +add_newline = false + +# Replace the "❯" symbol in the prompt with "➜" +[character] # The name of the module we are configuring is "character" +success_symbol = "[➜](bold green)" # The "success_symbol" segment is being set to "➜" with the color "bold green" + +# Disable the package module, hiding it from the prompt completely +[package] +disabled = true +``` + +You can change default `starship.toml` file location with `STARSHIP_CONFIG` environment variable: + +```sh +export STARSHIP_CONFIG=~/.starship +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CONFIG = "$HOME\.starship" +``` + +### Logging + +By default starship logs warnings and errors into a file named `~/.cache/starship/session_${STARSHIP_SESSION_KEY}.log`, where the session key is corresponding to a instance of your terminal. This, however can be changed using the `STARSHIP_CACHE` environment variable: + +```sh +export STARSHIP_CACHE=~/.starship/cache +``` + +Equivalently in PowerShell (Windows) would be adding this line to your `$PROFILE`: + +```ps1 +$ENV:STARSHIP_CACHE = "$HOME\AppData\Local\Temp" +``` + +### Terminology + +**Module**: A component in the prompt giving information based on contextual information from your OS. For example, the "nodejs" module shows the version of NodeJS that is currently installed on your computer, if your current directory is a NodeJS project. + +**Variable**: Smaller sub-components that contain information provided by the module. For example, the "version" variable in the "nodejs" module contains the current version of NodeJS. + +By convention, most modules have a prefix of default terminal color (e.g. `via` in "nodejs") and an empty space as a suffix. + +### Format Strings + +Format strings are the format that a module prints all its variables with. Most modules have an entry called `format` that configures the display format of the module. You can use texts, variables and text groups in a format string. + +#### Variable + +A variable contains a `$` symbol followed by the name of the variable. The name of a variable only contains letters, numbers and `_`. + +For example: + +- `$version` is a format string with a variable named `version`. +- `$git_branch$git_commit` is a format string with two variables named `git_branch` and `git_commit`. +- `$git_branch $git_commit` has the two variables separated with a space. + +#### Text Group + +A text group is made up of two different parts. + +The first part, which is enclosed in a `[]`, is a [format string](#format-strings). You can add texts, variables, or even nested text groups in it. + +In the second part, which is enclosed in a `()`, is a [style string](#style-strings). This can be used style the first part. + +For example: + +- `[on](red bold)` will print a string `on` with bold text colored red. +- `[⬢ $version](bold green)` will print a symbol `⬢` followed by the content of variable `version`, with bold text colored green. +- `[a [b](red) c](green)` will print `a b c` with `b` red, and `a` and `c` green. + +#### Style Strings + +Most modules in starship allow you to configure their display styles. This is done with an entry (usually called `style`) which is a string specifying the configuration. Here are some examples of style strings along with what they do. For details on the full syntax, consult the [advanced config guide](/advanced-config/). + +- `"fg:green bg:blue"` sets green text on a blue background +- `"bg:blue fg:bright-green"` sets bright green text on a blue background +- `"bold fg:27"` sets bold text with [ANSI color](https://i.stack.imgur.com/KTSQa.png) 27 +- `"underline bg:#bf5700"` sets underlined text on a burnt orange background +- `"bold italic fg:purple"` sets bold italic purple text +- `""` explicitly disables all styling + +Note that what styling looks like will be controlled by your terminal emulator. For example, some terminal emulators will brighten the colors instead of bolding text, and some color themes use the same values for the normal and bright colors. Also, to get italic text, your terminal must support italics. + +#### Conditional Format Strings + +A conditional format string wrapped in `(` and `)` will not render if all variables inside are empty. + +For example: + +- `(@$region)` will show nothing if the variable `region` is `None`, otherwise `@` followed by the value of region. +- `(some text)` will always show nothing since there are no variables wrapped in the braces. +- When `$all` is a shortcut for `\[$a$b\]`, `($all)` will show nothing only if `$a` and `$b` are both `None`. This works the same as `(\[$a$b\] )`. + +#### Escapable characters + +The following symbols have special usage in a format string. If you want to print the following symbols, you have to escape them with a backslash (`\`). + +- \$ +- \\ +- [ +- ] +- ( +- ) + +Note that `toml` has [its own escape syntax](https://github.com/toml-lang/toml#user-content-string). It is recommended to use a literal string (`''`) in your config. If you want to use a basic string (`""`), pay attention to escape the backslash `\`. + +For example, when you want to print a `$` symbol on a new line, the following configs for `format` are equivalent: + +```toml +# with basic string +format = "\n\\$" + +# with multiline basic string +format = """ + +\\$""" + +# with literal string +format = ''' + +\$''' +``` + +## Prompt + +This is the list of prompt-wide configuration options. + +### Options + +| Option | Default | Description | +| -------------- | ------------------------------ | ----------------------------------------------------- | +| `format` | [link](#default-prompt-format) | Configure the format of the prompt. | +| `scan_timeout` | `30` | Timeout for starship to scan files (in milliseconds). | +| `add_newline` | `true` | Add a new line before the start of the prompt. | + +### Example + +```toml +# ~/.config/starship.toml + +# Use custom format +format = """ +[┌───────────────────>](bold green) +[│](bold green)$directory$rust$package +[└─>](bold green) """ + +# Wait 10 milliseconds for starship to check files under the current directory. +scan_timeout = 10 + +# Disable the newline at the start of the prompt +add_newline = false +``` + +### Default Prompt Format + +The default `format` is used to define the format of the prompt, if empty or no `format` is provided. The default is as shown: + +```toml +format = "$all" + +# Which is equivalent to +format = """ +$username\ +$hostname\ +$shlvl\ +$kubernetes\ +$directory\ +$git_branch\ +$git_commit\ +$git_state\ +$git_status\ +$hg_branch\ +$docker_context\ +$package\ +$cmake\ +$dart\ +$dotnet\ +$elixir\ +$elm\ +$erlang\ +$golang\ +$helm\ +$java\ +$julia\ +$kotlin\ +$nim\ +$nodejs\ +$ocaml\ +$perl\ +$php\ +$purescript\ +$python\ +$ruby\ +$rust\ +$swift\ +$terraform\ +$zig\ +$nix_shell\ +$conda\ +$memory_usage\ +$aws\ +$gcloud\ +$openstack\ +$env_var\ +$crystal\ +$custom\ +$cmd_duration\ +$line_break\ +$lua\ +$jobs\ +$battery\ +$time\ +$status\ +$character""" +``` + +## AWS + +The `aws` module shows the current AWS region and profile. This is based on `AWS_REGION`, `AWS_DEFAULT_REGION`, and `AWS_PROFILE` env var with `~/.aws/config` file. + +When using [aws-vault](https://github.com/99designs/aws-vault) the profile is read from the `AWS_VAULT` env var. + +### Options + +| Option | Default | Description | +| ---------------- | ------------------------------------------------ | --------------------------------------------------------------- | +| `format` | `'on [$symbol$profile(\($region\))]($style) '` | The format for the module. | +| `symbol` | `"☁️ "` | The symbol used before displaying the current AWS profile. | +| `region_aliases` | | Table of region aliases to display in addition to the AWS name. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `AWS` module. | + +### Variables + +| Variable | Example | Description | +| --------- | ---------------- | ------------------------------------ | +| region | `ap-northeast-1` | The current AWS region | +| profile | `astronauts` | The current AWS profile | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Examples + +#### Display everything + +```toml +# ~/.config/starship.toml + +[aws] +format = 'on [$symbol$profile(\($region\))]($style) ' +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display region + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$region]($style) " +style = "bold blue" +symbol = "🅰 " +[aws.region_aliases] +ap-southeast-2 = "au" +us-east-1 = "va" +``` + +#### Display profile + +```toml +# ~/.config/starship.toml + +[aws] +format = "on [$symbol$profile]($style) " +style = "bold blue" +symbol = "🅰 " +``` + +## Battery + +The `battery` module shows how charged the device's battery is and its current charging status. The module is only visible when the device's battery is below 10%. + +### Options + +| Option | Default | Description | +| -------------------- | --------------------------------- | --------------------------------------------------- | +| `full_symbol` | `""` | The symbol shown when the battery is full. | +| `charging_symbol` | `""` | The symbol shown when the battery is charging. | +| `discharging_symbol` | `""` | The symbol shown when the battery is discharging. | +| `unknown_symbol` | `""` | The symbol shown when the battery state is unknown. | +| `empty_symbol` | `""` | The symbol shown when the battery state is empty. | +| `format` | `"[$symbol$percentage]($style) "` | The format for the module. | +| `display` | [link](#battery-display) | Display threshold and style for the module. | +| `disabled` | `false` | Disables the `battery` module. | + + +### Example + +```toml +# ~/.config/starship.toml + +[battery] +full_symbol = "🔋" +charging_symbol = "⚡️" +discharging_symbol = "💀" +``` + +### Battery Display + +The `display` configuration option is used to define when the battery indicator should be shown (threshold) and what it looks like (style). If no `display` is provided. The default is as shown: + +```toml +[[battery.display]] +threshold = 10 +style = "bold red" +``` + +#### Options + +The `display` option is an array of the following table. + +| Option | Description | +| ----------- | ----------------------------------------------- | +| `threshold` | The upper bound for the display option. | +| `style` | The style used if the display option is in use. | + +#### Example + +```toml +[[battery.display]] # "bold red" style when capacity is between 0% and 10% +threshold = 10 +style = "bold red" + +[[battery.display]] # "bold yellow" style when capacity is between 10% and 30% +threshold = 30 +style = "bold yellow" + +# when capacity is over 30%, the battery indicator will not be displayed + +``` + +## Character + +The `character` module shows a character (usually an arrow) beside where the text is entered in your terminal. + +The character will tell you whether the last command was successful or not. It can do this in two ways: + +- changing color (`red`/`green`) +- changing shape (`❯`/`✖`) + +By default it only changes color. If you also want to change it's shape take a look at [this example](#with-custom-error-shape). + +### Options + +| Option | Default | Description | +| ---------------- | ------------------- | -------------------------------------------------------------------------------- | +| `format` | `"$symbol "` | The format string used before the text input. | +| `success_symbol` | `"[❯](bold green)"` | The format string used before the text input if the previous command succeeded. | +| `error_symbol` | `"[❯](bold red)"` | The format string used before the text input if the previous command failed. | +| `vicmd_symbol` | `"[❮](bold green)"` | The format string used before the text input if the shell is in vim normal mode. | +| `disabled` | `false` | Disables the `character` module. | + +### Variables + +| Variable | Example | Description | +| -------- | ------- | --------------------------------------------------------------------- | +| symbol | | A mirror of either `success_symbol`, `error_symbol` or `vicmd_symbol` | + +### Examples + +#### With custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[✗](bold red) " +``` + +#### Without custom error shape + +```toml +# ~/.config/starship.toml + +[character] +success_symbol = "[➜](bold green) " +error_symbol = "[➜](bold red) " +``` + +#### With custom vim shape + +```toml +# ~/.config/starship.toml + +[character] +vicmd_symbol = "[V](bold green) " +``` + +## CMake + +The `cmake` module shows the currently installed version of CMake if any of the following conditions are met: + +- The current directory contains a `CMakeLists.txt` file +- The current directory contains a `CMakeCache.txt` file + +### Options + +| Option | Default | Description | +| ---------- | ---------------------------------- | -------------------------------------------- | +| `format` | `"via [$symbol$version]($style) "` | The format for the module. | +| `symbol` | `"喝 "` | The symbol used before the version of cmake. | +| `style` | `"bold blue"` | The style for the module. | +| `disabled` | `false` | Disables the `cmake` module. | + +### Variables + +| Variable | Example | Description | +| --------- | --------- | ------------------------------------ | +| version | `v3.17.3` | The version of cmake | +| symbol | | Mirrors the value of option `symbol` | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +## Command Duration + +The `cmd_duration` module shows how long the last command took to execute. The module will be shown only if the command took longer than two seconds, or the `min_time` config value, if it exists. + +::: warning Do not hook the DEBUG trap in Bash + +If you are running Starship in `bash`, do not hook the `DEBUG` trap after running `eval $(starship init $0)`, or this module **will** break. + +::: + +Bash users who need preexec-like functionality can use [rcaloras's bash_preexec framework](https://github.com/rcaloras/bash-preexec). Simply define the arrays `preexec_functions` and `precmd_functions` before running `eval $(starship init $0)`, and then proceed as normal. + +### Options + +| Option | Default | Description | +| -------------------- | ----------------------------- | ---------------------------------------------------------- | +| `min_time` | `2_000` | Shortest duration to show time for (in milliseconds). | +| `show_milliseconds` | `false` | Show milliseconds in addition to seconds for the duration. | +| `format` | `"took [$duration]($style) "` | The format for the module. | +| `style` | `"bold yellow"` | The style for the module. | +| `disabled` | `false` | Disables the `cmd_duration` module. | +| `show_notifications` | `false` | Show desktop notifications when command completes. | +| `min_time_to_notify` | `45_000` | Shortest duration for notification (in milliseconds). | + +::: tip + +Showing desktop notifications requires starship to be built with `rust-notify` support. You check if your starship supports notifications by running `STARSHIP_LOG=debug starship module cmd_duration -d 60000` when `show_notifications` is set to `true`. + +::: + +### Variables + +| Variable | Example | Description | +| --------- | -------- | --------------------------------------- | +| duration | `16m40s` | The time it took to execute the command | +| style\* | | Mirrors the value of option `style` | + +\*: This variable can only be used as a part of a style string + +### Example + +```toml +# ~/.config/starship.toml + +[cmd_duration] +min_time = 500 +format = "underwent [$duration](bold yellow)" +``` + +## Conda + +The `conda` module shows the current conda environment, if `$CONDA_DEFAULT_ENV` is set. + +::: tip + +This does not suppress conda's own prompt modifier, you may want to run `conda config --set changeps1 False`. + +::: + +### Options + +| Option | Default | Description | +| ------------------- | -------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `truncation_length` | `1` | The number of directories the environment path should be truncated to, if the environment was created via `conda create -p [path]`. `0` means no truncation. Also see the [`directory`](#directory) module. | +| `symbol` | `"🅒 "` | The symbol used before the environment name. | +| `style` | `"bold green"` | The style for the module. | +| `format` | `"via [$symbol$environment]($style) "` | The format for the module. | +| `ignore_base` | `true` | Ignores `base` environment when activated. |