diff options
-rw-r--r-- | README.md | 421 | ||||
-rw-r--r-- | config/p10k-pure.zsh | 11 |
2 files changed, 371 insertions, 61 deletions
@@ -1,56 +1,286 @@ # Powerlevel10k [![Gitter](https://badges.gitter.im/powerlevel10k/community.svg)](https://gitter.im/powerlevel10k/community?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) -Powerlevel10k is a theme for ZSH. It's fast, flexible and easy to install and configure. +Powerlevel10k is a theme for ZSH. It emphasizes [speed](#unparalleled-performance), +[flexibility](#extremely-customizable) and [out-of-the-box experience](#configuration-wizard). -Powerlevel10k can be used as a [fast](#is-it-really-fast) drop-in replacement for -[Powerlevel9k](https://github.com/bhilburn/powerlevel9k). When given the same configuration options -it will generate the same prompt. +![Powerlevel10k]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/prompt-styles.png) -![Powerlevel10k](https://raw.githubusercontent.com/romkatv/powerlevel10k/master/powerlevel10k.png) +To see what Powerlevel10k is about, scroll through [features](#features). -## Table of Contents +Powerlevel9k users, go [here](#powerlevel9k-compatibility). -1. [Installation](#installation) - 1. [Manual](#manual) - 1. [Oh My Zsh](#oh-my-zsh) - 1. [Prezto](#prezto) - 1. [Zim](#zim) - 1. [Antigen](#antigen) - 1. [Zplug](#zplug) - 1. [Zgen](#zgen) - 1. [Antibody](#antibody) - 1. [Zplugin](#zplugin) -1. [Configuration](#configuration) - 1. [For new users](#for-new-users) - 1. [For Powerlevel9k users](#for-powerlevel9k-users) -1. [Fonts](#fonts) - 1. [Recommended: Meslo Nerd Font patched for Powerlevel10k](#recommended-meslo-nerd-font-patched-for-powerlevel10k) -1. [Try it in Docker](#try-it-in-docker) -1. [Is it really fast?](#is-it-really-fast) -1. [License](#license) -1. [FAQ](#faq) - 1. [What is instant prompt?](#what-is-instant-prompt) - 1. [Why do my icons and/or powerline symbols look bad?](#why-do-my-icons-andor-powerline-symbols-look-bad) - 1. [I'm getting "character not in range" error. What gives?](#im-getting-character-not-in-range-error-what-gives) - 1. [Why is my cursor in the wrong place?](#why-is-my-cursor-in-the-wrong-place) - 1. [Why is my prompt wrapping around in a weird way?](#why-is-my-prompt-wrapping-around-in-a-weird-way) - 1. [Why is my right prompt in the wrong place?](#why-is-my-right-prompt-in-the-wrong-place) - 1. [Why does the configuration wizard run automatically every time I start zsh?](#why-does-the-configuration-wizard-run-automatically-every-time-i-start-zsh) - 1. [I cannot install the recommended font. Help!](#i-cannot-install-the-recommended-font-help) - 1. [Why do I have a question mark symbol in my prompt? Is my font broken?](#why-do-i-have-a-question-mark-symbol-in-my-prompt-is-my-font-broken) - 1. [What do different symbols in Git status mean?](#what-do-different-symbols-in-git-status-mean) - 1. [How do I change the format of Git status?](#how-do-i-change-the-format-of-git-status) - 1. [How do I add username and/or hostname to prompt?](#how-do-i-add-username-andor-hostname-to-prompt) - 1. [How do I change colors?](#how-do-i-change-colors) - 1. [Why some prompt segments appear and disappear as I'm typing?](#why-some-prompt-segments-appear-and-disappear-as-im-typing) - 1. [Why does Powerlevel10k spawn extra processes?](#why-does-powerlevel10k-spawn-extra-processes) - 1. [Are there configuration options that make Powerlevel10k slow?](#are-there-configuration-options-that-make-powerlevel10k-slow) - 1. [Is Powerlevel10k fast to load?](#is-powerlevel10k-fast-to-load) - 1. [Does Powerlevel10k always render exactly the same prompt as Powerlevel9k given the same config?](#does-powerlevel10k-always-render-exactly-the-same-prompt-as-powerlevel9k-given-the-same-config) - 1. [Is there an AUR package for Powerlevel10k?](#is-there-an-aur-package-for-powerlevel10k) - 1. [I cannot make Powerlevel10k work with my plugin manager. Help!](#i-cannot-make-powerlevel10k-work-with-my-plugin-manager-help) - 1. [What is the minimum supported zsh version?](#what-is-the-minimum-supported-zsh-version) +Ready to give Powerlevel10k a try? + +1. Install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). *Optional but highly + recommended.* +1. Install Powerlevel10k for your plugin manager. + - [Manual](#manual) 👈 **choose this if confused or uncertain** + - [Oh My Zsh](#oh-my-zsh) + - [Prezto](#prezto) + - [Zim](#zim) + - [Antigen](#antigen) + - [Zplug](#zplug) + - [Zgen](#zgen) + - [Antibody](#antibody) + - [Zplugin](#zplugin) +1. Restart Zsh. If the configuration wizard doesn't start automatically, type `p10k configure`. + +The full [table of contents](#table-of-contents) is at the bottom of the page. + +## Features + +### Configuration wizard + +Type `p10k configure` to access the builtin configuration wizard right from your terminal. + +![Powerlevel10k Configuration Wizard]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/configuration-wizard.gif) + +All styles except [Pure](#pure-compatibility) are functionally equivalent. They display the same +information and differ only in presentation. + +Configuration wizard creates `~/.p10k.zsh` based on your preferences. Additional prompt +customization can be done by editing this file. It has many comments to help you navigate through +configuration options. + +Tip: Install [the recommended font](#recommended-meslo-nerd-font-patched-for-powerlevel10k) before +running `p10k configure`. + +### Unparalleled performance + +When you hit *ENTER*, the next prompt appears instantly. With Powerlevel10k there is no prompt lag. +If you install Cygwin on Raspberry Pi, `cd` into a Linux Git repository and activate enough prompt +segments to fill four prompt lines on both sides of the screen... wait, that's just crazy and no +one ever does that. Probably impossible, too. The point is, Powerlevel10k prompt is always fast, no +matter what you do! + +![Powerlevel10k Performance]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/performance.gif) + +Note how the effect of every command is instantly reflected by the very next prompt. + +| Command | Prompt Indicator | Meaning | +|-------------------------------|:----------------:|-------------------------------------:| +| `timew start hack linux` | `🛡️ hack linux` | time tracking enabled in timewarrior | +| `touch x y` | `?2` | 2 untracked files | +| `rm COPYING` | `!1` | 1 unstaged change | +| `echo 2.7.3 >.python-version` | `🐍 2.7.3` | the current python version in pyenv | + +Other Zsh themes capable of displaying the same information either produce prompt lag or print +prompt that doesn't reflect the current state of the system and then refresh it later. With +Powerlevel10k you get fast prompt *and* up-to-date information. + +### Powerlevel9k compatibility + +Powerlevel10k understands all [Powerlevel9k](https://github.com/Powerlevel9k/powerlevel9k) +configuration parameters. + +![Powerlevel10k Compatibility with 9k]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/9k-compatibility.gif) + +If you are currently using Powerlevel9k, you can switch to Powerlevel10k in just a few seconds. +All your `POWERLEVEL9K` configuration parameters will still work. Prompt will look the same as +before but it will be *much* faster. + +How to switch to Powerlevel10k if you are using Powerlevel9k with Oh My Zsh: + +1. Clone powerlevel10k repository. +2. Replace `ZSH_THEME="powerlevel9k/powerlevel9k"` with `ZSH_THEME="powerlevel10k/powerlevel10k"` +3. Restart Zsh. + +Copy-paste this command to perform the 3 steps automatically: + +```zsh +git clone --depth=1 https://github.com/romkatv/powerlevel10k.git $ZSH_CUSTOM/themes/powerlevel10k +sed 's/powerlevel9k/powerlevel10k/g' -i ~/.zshrc +exec zsh +``` + +Optional steps (*highly recommended*): + +4. Install [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). +5. Type `p10k configure` and explore exlusive Powerlevel10k prompt styles. + +### Pure compatibility + +Powerlevel10k can produce the same prompt as [Pure](https://github.com/sindresorhus/pure). Type +`p10k configure` and select *Pure* style. + +![Powerlevel10k Pure Style]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/pure-style.gif) + +You can still use Powerlevel10k features such as [Transient Prompt](#transient-prompt) or +[Instant Prompt](#instant-prompt) when sporting Pure style. + +To customize prompt, edit `~/.p10k.zsh`. Powerlevel10k doesn't recognize Pure configuration +parameters, so you need to use `POWERLEVEL9K_COMMAND_EXECUTION_TIME_THRESHOLD=3` instead of +`PURE_CMD_MAX_EXEC_TIME=3`, etc. All relevant parameters are in the config. + +### Instant prompt + +If your `~/.zshrc` loads many plugins, or perhaps just a few slow ones (pyenv and nvm are the usual +suspects), you may have noticed that it takes some time for Zsh to start. + +![Powerlevel10k Pure Style]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/no-instant-prompt.gif) + +Powerlevel10k can remove Zsh startup lag *even if it's not caused by a theme*. + +![Powerlevel10k Pure Style]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/instant-prompt.gif) + +This feature is called *Instant Prompt*. You need to explicitly enable it through `p10k configure` +or [manually](#what-is-instant-prompt). It does what it says on the tin -- prints prompt instantly +upon Zsh startup allowing you to start typing while plugins are still loading. + +Other themes *increase* Zsh startup lag -- some by a lot, others by a just a little. Powerlevel10k +*removes* it outright. + +For details, see [FAQ](#what-is-instant-prompt). + +### Show on command + +The behavior of some commands depends on global environment. For example, `kubectl run ...` runs an +image on the cluster defined by the current kubernetes context. If you frequently change context +between "prod" and "testing", you might want to display the current context in Zsh prompt. If you do +likewise for AWS, Azure and Google Cloud credentials, prompt will get pretty crowded. + +Enter *Show On Command*. This feature makes prompt segments appear only when they are relevant to +the command you are currently typing. + +![Powerlevel10k Show On Command]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/show-on-command.gif) + +Configs created by `p10k configure` enable Show On Command for several prompt segments by default. +Here's the relevant parameter for kubernetes context: + +```zsh +# Show prompt segment "kubecontext" only when the command you are typing +# invokes kubectl, helm, kubens, kubectx or oc. +typeset -g POWERLEVEL9K_KUBECONTEXT_SHOW_ON_COMMAND='kubectl|helm|kubens|kubectx|oc' +``` + +To customize when different prompt segments are shown, open `~/.p10k.zsh`, search for +`SHOW_ON_COMMAND` and either remove these parameters to display affected segments unconditionally, +or change their values. + +### Transient prompt + +When *Transient Prompt* is enabled through `p10k configure`, Powerlevel10k will trim down every +prompt when accepting a command line. + +![Powerlevel10k Show On Command]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/transient-prompt.gif) + +Transient Prompt makes it much easier to copy-paste series of commands from the terminal scrollback. + +Tip: If you enable Transient Prompt, take advantage of two-line prompt. You'll get the benefit of +extra space for typing commands without the usual drawback of reduced scrollback density. + +### Current directory that just works + +The current working directory is perhaps the most important prompt segment. Powerlevel10k goes to +great length to highlight its important parts and to truncate it with the least loss of information. + +![Powerlevel10k Directory Truncation]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/directory-truncation.gif) + +When the full directory doesn't fit, the leftmost segment gets truncated to its shortest unique +prefix. In the screencast, `~/work` becomes `~/wo`. It couldn't be truncated to `~/w` because it +would be ambiguous (there was `~/wireguard` when the session was recorded). The next segment -- +`projects` -- turns into `p` as there was nothing else that started with `p` in `~/work`. + +Directory segments are shown in one of three colors: + +- Truncated segments are bleak. +- Important segments are bright and never truncated. These include the first and the last segment, + roots of Git repositories, etc. +- Regular segments (not truncated but can be) use in-between color. + +Tip: If you copy-paste a truncated directory and hit *TAB*, it'll complete to the original. + +### Extremely customizable + +Powerlevel10k can be configured to look like any other Zsh theme. + +![Powerlevel10k Other Theme Emulation]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/other-theme-emulation.gif) + +[Pure](#pure-compatibility) and [Powerlevel9k](#powerlevel9k-compatibility) emulation is built-in. +To emulate the appearence of other themes, you'll need to write a suitable configuration file. The +best way to go about it is to run `p10k configure`, select the style that is the closest to your +goal and then edit `~/.p10k.zsh`. + +The full range of Powerlevel10k appearance spans from spartan: + +![Powerlevel10k Spartan Style]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/spartan-style.png) + +To ~~ridiculous~~ extravagant: + +![Powerlevel10k Extravagant Style]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/extravagant-style.png) + +### Batteries included + +Powerlevel10k comes with dozens of built-in high quality segments. When you run `p10k configure` +and choose any style except Pure, most of these segments get enabled by default. Some must be +manually enabled by opening `~/.p10k.zsh` and uncommenting them. You can enable as many segments as +you like. It won't slow down your prompt or Zsh startup. + +| Segment | Meaning | +|--------:|---------| +| `os_icon` | your OS logo (apple for macOS, swirl for debian, etc.) | +| `dir` | current working directory | +| `vcs` | Git repository status | +| `prompt_char` | multi-functional prompt symbol; changes depending on vi mode: `❯`, `❮`, `Ⅴ`, `▶` for insert, command, visual and replace mode respectively; turns red on error | +| `context` | user@hostname | +| `status` | exit code of the last command | +| `command_execution_time` | duration (wall time) of the last command | +| `background_jobs` | presence of background jobs | +| `time` | current time | +| `direnv` | [direnv](https://direnv.net/) status | +| `virtualenv` | python environment from [venv](https://docs.python.org/3/library/venv.html) | +| `anaconda` | virtual environment from [conda](https://conda.io/) | +| `pyenv` | python environment from [pyenv](https://github.com/pyenv/pyenv) | +| `goenv` | go environment from [goenv](https://github.com/syndbg/goenv) | +| `nodenv` | node.js environment from [nodenv](https://github.com/nodenv/nodenv) | +| `nvm` | node.js environment from [nvm](https://github.com/nvm-sh/nvm) | +| `nodeenv` | node.js environment from [nodeenv](https://github.com/ekalinin/nodeenv) | +| `rbenv` | ruby environment from [rbenv](https://github.com/rbenv/rbenv) | +| `rvm` | ruby environment from [rvm](https://rvm.io) | +| `fvm` | flutter environment from [fvm](https://github.com/leoafarias/fvm) | +| `luaenv` | lua environment from [luaenv](https://github.com/cehoffman/luaenv) | +| `jenv` | java environment from [jenv](https://github.com/jenv/jenv) | +| `plenv` | perl environment from [plenv](https://github.com/tokuhirom/plenv) | +| `node_version` | [node.js](https://nodejs.org/) version | +| `go_version` | [go](https://golang.org) version | +| `rust_version` | [rustc](https://www.rust-lang.org) version | +| `dotnet_version` | [dotnet](https://dotnet.microsoft.com) version | +| `kubecontext` | current [kubernetes](https://kubernetes.io/) context | +| `terraform` | [terraform](https://www.terraform.io) workspace | +| `aws` | [aws profile](https://docs.aws.amazon.com/cli/latest/userguide/cli-configure-profiles.html) | +| `aws_eb_env` | [aws elastic beanstalk](https://aws.amazon.com/elasticbeanstalk/) environment | +| `azure` | [azure](https://docs.microsoft.com/en-us/cli/azure) account name | +| `gcloud` | [google cloud](https://cloud.google.com/) cli acccount and project | +| `google_app_cred` | [google application credentials](https://cloud.google.com/docs/authentication/production) | +| `nordvpn` | [nordvpn](https://nordvpn.com/) connection status | +| `ranger` | [ranger](https://github.com/ranger/ranger) shell | +| `nnn` | [nnn](https://github.com/jarun/nnn) shell | +| `vim_shell` | [vim](https://www.vim.org/) shell (`:sh`) | +| `midnight_commander` | [midnight commander](https://midnight-commander.org/) shell | +| `todo` | [todo](https://github.com/todotxt/todo.txt-cli) items | +| `timewarrior` | [timewarrior](https://timewarrior.net/) tracking status | +| `vpn_ip` | virtual private network indicator | +| `load` | CPU load | +| `disk_usage` | disk usage | +| `ram` | free RAM | +| `swap` | used swap | +| `public_ip` | public ip address | +| `proxy` | system-wide http/https/ftp proxy | +| `battery` | internal battery state and charge level (yep, batteries *literally* included) | ## Installation @@ -133,7 +363,23 @@ It works well with [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts), the default system fonts. The full choice of style options is available only when using [Nerd Fonts](https://github.com/ryanoasis/nerd-fonts). -### Recommended: Meslo Nerd Font patched for Powerlevel10k +👇 **Recommended font**: Meslo Nerd Font patched for Powerlevel10k. 👇 + +### <a name='recommended-meslo-nerd-font-patched-for-powerlevel10k'></a>Meslo Nerd Font patched for Powerlevel10k + +Gorgeous monospace font designed by Jim Lyles for Apple, customized by André Berg, patched by Ryan +L McIntyre of Nerd Fonts, and hand-edited in FontForge by yours trully. Contains all glyphs and +symbols that Powerlevel10k may need. Battle-tested in dozens of different terminals on all major +operating systems. + +#### Automatic font installation + +If you are using iTerm2 or Termux, `p10k configure` can install the recommended font for you. +Simply answer `Yes` when asked whether to install *Meslo Nerd Font*. + +If you are using a different terminal, proceed with manual font installation. + +#### Manual font installation Download these four ttf files: - [MesloLGS NF Regular.ttf](https://github.com/romkatv/dotfiles-public/raw/master/.local/share/fonts/NerdFonts/MesloLGS%20NF%20Regular.ttf) @@ -144,9 +390,7 @@ Download these four ttf files: Double-click on each file and press "Install". This will make `MesloLGS NF` font available to all applications on your system. Configure your terminal to use this font: -- **iTerm2**: Type `p10k configure`, answer `Yes` when asked whether to install - *Meslo Nerd Font* and restart iTerm2 for the changes to take effect. Alternatively, open - *iTerm2 → Preferences → Profiles → Text* and set *Font* to `MesloLGS NF`. +- **iTerm2**: Open *iTerm2 → Preferences → Profiles → Text* and set *Font* to `MesloLGS NF`. - **Apple Terminal** Open *Terminal → Preferences → Profiles → Text*, click *Change* under *Font* and select `MesloLGS NF` family. - **Hyper**: Open *Hyper → Edit → Preferences* and change the value of `fontFamily` under @@ -222,7 +466,7 @@ covered by the same license. ## FAQ -### <a name='instant-prompt'></a>What is instant prompt? +### </a>What is instant prompt? *Instant Prompt* is an optional feature of Powerlevel10k. When enabled, it gives you a limited prompt within a few milliseconds of starting zsh, allowing you to start hacking right away while zsh @@ -584,20 +828,20 @@ theme (so that you end up with no theme) and then installing Powerlevel10k manua 1. Disable the current theme in your framework / plugin manager. +- **oh-my-zsh:** Open `~/.zshrc` and remove the line that sets `ZSH_THEME`. It might look like this: + `ZSH_THEME="powerlevel9k/powerlevel9k"`. - **zplug:** Open `~/.zshrc` and remove the `zplug` command that refers to your current theme. For example, if you are currently using Powerlevel9k, look for `zplug bhilburn/powerlevel9k, use:powerlevel9k.zsh-theme`. - **prezto:** Open `~/.zpreztorc` and put `zstyle :prezto:module:prompt theme off` in it. Remove any other command that sets `theme` such as `zstyle :prezto:module:prompt theme powerlevel9k`. -- **oh-my-zsh:** Open `~/.zshrc` and remove the line that sets `ZSH_THEME`, such as - `ZSH_THEME=powerlevel9k/powerlevel9k`. -- **antigen:** Open `~/.zshrc` and remove the line that sets `antigen theme`, such as - `antigen theme powerlevel9k/powerlevel9k`. +- **antigen:** Open `~/.zshrc` and remove the line that sets `antigen theme`. It might look like + this: `antigen theme powerlevel9k/powerlevel9k`. 2. Install Powerlevel10k manually. ```zsh -git clone https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k +git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ~/powerlevel10k echo 'source ~/powerlevel10k/powerlevel10k.zsh-theme' >>! ~/.zshrc ``` @@ -606,3 +850,68 @@ This method of installation won't make anything slower or otherwise sub-par. ### What is the minimum supported zsh version? Zsh 5.1 or newer should work. Fast startup requires zsh >= 5.4. + +### How were these screenshots and animated gifs created? + +All screenshots and animated gifs were recorded in GNOME Terminal with white text on black +background, Tango palette, and [the recommended font](#meslo-nerd-font-patched-for-powerlevel10k). + +![GNOME Terminal Color Settings]( + https://raw.githubusercontent.com/romkatv/powerlevel10k-media/master/gnome-terminal-colors.png) + +## Table of contents + +1. [Features](#features) + 1. [Configuration wizard](#configuration-wizard) + 1. [Unparalleled performance](#unparalleled-performance) + 1. [Powerlevel9k compatibility](#powerlevel9k-compatibility) + 1. [Pure compatibility](#pure-compatibility) + 1. [Instant prompt](#instant-prompt) + 1. [Show On Command](#show-on-command) + 1. [Transient prompt](#transient-prompt) + 1. [Current directory that just works](#current-directory-that-just-works) + 1. [Extremely customizable](#extremely-customizable) + 1. [Batteries included](#batteries-included) +1. [Installation](#installation) + 1. [Manual](#manual) + 1. [Oh My Zsh](#oh-my-zsh) + 1. [Prezto](#prezto) + 1. [Zim](#zim) + 1. [Antigen](#antigen) + 1. [Zplug](#zplug) + 1. [Zgen](#zgen) + 1. [Antibody](#antibody) + 1. [Zplugin](#zplugin) +1. [Configuration](#configuration) + 1. [For new users](#for-new-users) + 1. [For Powerlevel9k users](#for-powerlevel9k-users) +1. [Fonts](#fonts) + 1. [Meslo Nerd Font patched for Powerlevel10k](#meslo-nerd-font-patched-for-powerlevel10k) + 1. [Automatic font installation](#automatic-font-installation) + 1. [Manual font installation](#manual-font-installation) +1. [Try it in Docker](#try-it-in-docker) +1. [Is it really fast?](#is-it-really-fast) +1. [License](#license) +1. [FAQ](#faq) + 1. [What is instant prompt?](#what-is-instant-prompt) + 1. [Why do my icons and/or powerline symbols look bad?](#why-do-my-icons-andor-powerline-symbols-look-bad) + 1. [I'm getting "character not in range" error. What gives?](#im-getting-character-not-in-range-error-what-gives) + 1. [Why is my cursor in the wrong place?](#why-is-my-cursor-in-the-wrong-place) + 1. [Why is my prompt wrapping around in a weird way?](#why-is-my-prompt-wrapping-around-in-a-weird-way) + 1. [Why is my right prompt in the wrong place?](#why-is-my-right-prompt-in-the-wrong-place) + 1. [Why does the configuration wizard run automatically every time I start zsh?](#why-does-the-configuration-wizard-run-automatically-every-time-i-start-zsh) + 1. [I cannot install the recommended font. Help!](#i-cannot-install-the-recommended-font-help) + 1. [Why do I have a question mark symbol in my prompt? Is my font broken?](#why-do-i-have-a-question-mark-symbol-in-my-prompt-is-my-font-broken) + 1. [What do different symbols in Git status mean?](#what-do-different-symbols-in-git-status-mean) + 1. [How do I change the format of Git status?](#how-do-i-change-the-format-of-git-status) + 1. [How do I add username and/or hostname to prompt?](#how-do-i-add-username-andor-hostname-to-prompt) + 1. [How do I change colors?](#how-do-i-change-colors) + 1. [Why some prompt segments appear and disappear as I'm typing?](#why-some-prompt-segments-appear-and-disappear-as-im-typing) + 1. [Why does Powerlevel10k spawn extra processes?](#why-does-powerlevel10k-spawn-extra-processes) + 1. [Are there configuration options that make Powerlevel10k slow?](#are-there-configuration-options-that-make-powerlevel10k-slow) + 1. [Is Powerlevel10k fast to load?](#is-powerlevel10k-fast-to-load) + 1. [Does Powerlevel10k always render exactly the same prompt as Powerlevel9k given the same config?](#does-powerlevel10k-always-render-exactly-the-same-prompt-as-powerlevel9k-given-the-same-config) + 1. [Is there an AUR package for Powerlevel10k?](#is-there-an-aur-package-for-powerlevel10k) + 1. [I cannot make Powerlevel10k work with my plugin manager. Help!](#i-cannot-make-powerlevel10k-work-with-my-plugin-manager-help) + 1. [What is the minimum supported zsh version?](#what-is-the-minimum-supported-zsh-version) + 1. [How were these screenshots and animated gifs created?](#how-were-these-screenshots-and-animated-gifs-created) diff --git a/config/p10k-pure.zsh b/config/p10k-pure.zsh index f7a6dd1c..50299dff 100644 --- a/config/p10k-pure.zsh +++ b/config/p10k-pure.zsh @@ -12,7 +12,8 @@ # doesn't fit on one line, it wraps around with no attempt to shorten it. # # If you like the general style of Pure but not particularly attached to all its quirks, type -# `p10k configure` while having Powerlevel10k theme active and pick "Lean" style. +# `p10k configure` and pick "Lean" style. This will give you slick minimalist prompt while taking +# advantage of Powerlevel10k features that aren't present in Pure. # Temporarily change options. 'builtin' 'local' '-a' 'p10k_config_opts' @@ -117,12 +118,12 @@ typeset -g POWERLEVEL9K_VCS_{INCOMING,OUTGOING}_CHANGESFORMAT_FOREGROUND=$cyan # Don't show remote branch, current tag or stashes. typeset -g POWERLEVEL9K_VCS_GIT_HOOKS=(vcs-detect-changes git-untracked git-aheadbehind) - # Don't show the branh icon. + # Don't show the branch icon. typeset -g POWERLEVEL9K_VCS_BRANCH_ICON= # When in detached HEAD state, show @commit where branch normally goes. typeset -g POWERLEVEL9K_VCS_COMMIT_ICON='@' # Don't show staged, unstaged, untracked indicators. - typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON=$'\b' + typeset -g POWERLEVEL9K_VCS_{STAGED,UNSTAGED,UNTRACKED}_ICON= # Show '*' when there are staged, unstaged or untracked files. typeset -g POWERLEVEL9K_VCS_DIRTY_ICON='*' # Show '⇣' if local branch is behind remote. @@ -131,8 +132,8 @@ typeset -g POWERLEVEL9K_VCS_OUTGOING_CHANGES_ICON='⇡' # Don't show the number of commits next to the ahead/behind arrows. typeset -g POWERLEVEL9K_VCS_{COMMITS_AHEAD,COMMITS_BEHIND}_MAX_NUM=1 - # Remove space between '⇣' and '⇡'. - typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${P9K_CONTENT/⇣* ⇡/⇣⇡}' + # Remove space between '⇣' and '⇡' and all trailing spaces. + typeset -g POWERLEVEL9K_VCS_CONTENT_EXPANSION='${${P9K_CONTENT/⇣* ⇡/⇣⇡}// }' # Transient prompt works similarly to the builtin transient_rprompt option. It trims down prompt # when accepting a command line. Supported values: |