Hi. I’ve been using powerlevel10k for a long time, but a few days ago, I decided I wanted to customize it a bit. I opened the .p10k.zsh file, and I was shocked. It’s really massive, with TONS of options. I’ve been digging through for a few hours already, and it’s absolutely amazing how much you can customize it without actually programming anything. I was wondering what other people are using. So my questions are:
- Do you customize your shell prompt?
- If yes, do you use some framework or pre-made theme, or do you just configure it the vanilla way in your bashrc/zshrc/…
- How is your experiences with it so far?
- Share screenshot of your prompts, please (Sadly, my prompt is currently half done, so I can’t really share it)
There are two usability tweaks that I would find it hard to live without: (1) red prompt on last-command failure, and (2) highlight what I type, dehighlight output:
Reason for 1 is obvious, 2 is more subtle: it helps my eye scan scrollback and identify what I’ve typed, which is what I’m scanning for 90% of the time.
Implementations vary, here’s how I do it in zsh:
PS1='%(?.%K{cyan}%F{white}.%B%K{red}%F{white})XX%b%k%f %(?.%F{cyan}.%F{red})yyy%k%b%F{yellow}%(!.#.$)%f '
. Duplication is evil, but AFAIK necessary because the conditional (error check) is%(?
and I highlight both parts of my two-part prompt. Suggestions welcome for removing the duplication.zle_highlight=("default:fg=white")
(on a Solarized Dark term, where the default fg color is light gray. Adjust to fit your needs).Thanks for your detailed explanation! It’s minimal, yet it looks very well usable.